I'm trying to load .json into d3 but i'm not getting an array of objects.
My json structure is like this:
{
"01": {
"a": "7.9146197142424404",
"b": "8",
"c": "64.52183289033583",
"d": "bar"
},
"02": {
"a": "6.1448162722275468",
"b": "2",
"c": "82.657170917364141",
"d": "foo"
}
}
Loading data:
d3.json('mydata.json', function(data){
console.log(data)
});
When I console.log my data I get this:
https://www.dropbox.com/s/rgf38dkt6nrurei/Screen%20Shot%202014-07-05%20at%2019.26.41.png
Update:
So what I would want to do is add elements for each of the .json objects but it would be nice if I could make the first number the Key.