Published
Edited
Mar 20, 2020
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
prettyJSON = json => {
return JSON.stringify(json, function(k,v){
for(var p in v) {
if(v[p] instanceof Object) {
return v;
}
}
return JSON.stringify(v, null, 1);
}, 2)
.replace(/\\n/g, '')
.replace(/\\/g, '')
.replace(/\"\[/g, '[')
.replace(/\]\"/g,']')
.replace(/\"\{/g, '{')
.replace(/\}\"/g,' }')
}
Insert cell
Insert cell
Insert cell
prettySample1 = prettyJSON(dataSample1);
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more