I have a json document that looks like this:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"time": 1438342780,
"title": "Iran's foreign minister calls for world's nuclear weapons states to disarm",
"author": "Julian Borger",
"web_id": "world/2015/jul/31/iran-nuclear-weapons-states-disarm-israel"
},
"geometry": {
"type": "Point",
"coordinates": [
-77.26526,
38.90122
]
}
},
{
"type": "Feature",
"properties": {
"time": 1438300867,
"title": "Big bangs over the white cliffs of Dover as unique 1915 artillery gun is fired again",
"author": "Maev Kennedy",
"web_id": "world/2015/jul/31/big-bangs-over-white-cliffs-dover-unique-1915-artillery-gun-fired-again"
},
"geometry": {
"type": "Point",
"coordinates": [
1.3,
51.13333
]
}
}
]
}
I would like to fetch the 'feature' array inside json and return the number of features for a given day. For example, for the data above I would expect something like:
{
"date": 7/31/2015,
"number": 2
}
Currently I have something that looks like this:
d3.json('path/to/json', function(json) {
data = json;
});
Fairly new to js and d3 so a bit stumped. Let me know if you need any more details. Thanks in advance!