var barData = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [65, 59, 80, 81, 56, 55, 40]
}
]
};
这是使用从android应用程序发送到javascript的所有数据编码的json对象。现在在javascript中,如何从barData json对象访问labels数组或数据集数组?
我希望标签[0] 1月以及数据集[0] .data [0] 65 即可。这是我一直在尝试但失败的代码。你能给我一个简单的解决方案吗? 不管怎样,谢谢