Simplify a JavaScript / Typescript helper function which returns an array of objects
I have this json object: const data = { one: { items: [ { title: 'Home', url: '', }, { title: 'Title test', url: '/test', }, ], }, two: { items: [ { title: 'Title test 2', url: '/test2', },…