I have an object that looks like this,
{
"1420165140": 172.52,
"1420254360": 63.78,
"1420341900": 141.55,
"1420422480": 85.8,
"1421035920": 86.07,
"1422506820": 118.42
}
The keys are epoch time stamps. I would like to extract the max and min dates of the keys using something like this,
var range = d3.extent(d, function(d){ return d.key });
I've tried casting +d.key
to a number from a string.
Unfortunately, all I get back is [undefined, undefined]
How can I run d3.extent on object keys?