I'd like to create a simple pie chart in d3.js. The request response that I'm working with looks like this:
{"record":[{"status":"request"},{"status":"requirements"},{"status":"request"}]};
From what I've seen in examples, I need to convert that object to this:
[{"label":"Request", "value":2}, {"label":"Requirements", "value":1}];
I'm happy to use d3 functions or underscore or straight javascript to accomplish this, I just haven't been able to crack it on my own. Any help would be much appreciated!