Restructuring Data - Vincentvanleeuwen/frontend-data GitHub Wiki
Goal
At this moment our data is returned as arrays like this:
Array[ ['capacity', '5'], ['chargingpointcapacity', '4'], ['location', 'Amsterdam'] ]
I want to restructure the data set so that I can use it within d3.js. The perfect structure would be like this:
Amsterdam: { capacity: '5000', chargingpoints: '400'}
I'm going to need to write some kind of reduce function.