How can I transform a big object to array with lodash?
object
array
var obj = { 22: {name:\"John\", id:22, friends:[5,31,55], works:{books:[],
For me, this worked:
_.map(_.toPairs(data), d => _.fromPairs([d]));
It turns
{"a":"b", "c":"d", "e":"f"}
into
[{"a":"b"}, {"c":"d"}, {"e":"f"}]