I have something like this (im obtaining it from API, so I cant change it):
{ one: [ { price: ['$10'], weight: ['1000'], color: ['red'] } ],
two: [ { price: ['$20'], weight: ['2000'], color: ['green'] } ],
three: [ { price: ['$30'], weight: ['3000'], color: ['blue'] } ] }
And I want to convert all "price", "weight" and "color" keys to its values, to look like this:
{ one: [ '$10', '1000', 'red' ],
two: [ '$20', '2000', 'green' ],
three: [ '$30', '3000', 'blue' ] }
Is there any simple way to do this?
Edit: Example fixed
Edit2: Wanted result fixed