Published
Edited
Oct 12, 2021
Insert cell
Insert cell
test = [
{ label: "a", value: 3 },
{ label: "b", value: 2 },
{ label: "c", value: 4 }
]
Insert cell
test.sort((a, b) => {
if (a.label === "a") return -1;
if (b.label === "a") return 1;
return b.value - a.value;
})
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