Published
Edited
Aug 12, 2020
Insert cell
md`# JSON`
Insert cell
val = {
var json = {
"name": "alice",
"laughstyle":[
{"haha": 1}, // 0
{"xixi": 2},
{"haha": 3}, // 2
{"hehe": 4}
]
}
return json["laughstyle"][2]
}
Insert cell
{
// green triangle
var json = {
"balloon1": {
"color": "red",
"shape": "ball"
},
"balloon2": {
"color": "blue",
"shape": "rectangle"
},
"balloon3": {
"color": "green",
"shape": "triangle"
}
}
return json.balloon3.shape
}
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