Is there a way to achieve this transformation in lodash or any other JavaScript/TypeScript method?
var obj = {
a: [ {id:1},{id:2},{id:3}]
b: [ {id:4},{id:5},{id:6}]
c: [ {id:7},{id:8},{id:9}]
}
// Need to transform into
var arr = [
{title:a, items:[{id:1},{id:2},{id:3}]},
{title:b, items: [ {id:4},{id:5},{id:6}]},
{title:c, items: [ id:7},{id:8},{id:9}]}
]