Merge subarrays using Observables
Provided it is a typo and the second element has subItems as well (and not searchProfiles), you don’t need flatMap or any thing of the sort, you can do it in a plain map using js array operators: var transformed = [].concat(…result.map(item => item.subItems)); or in your case httpResult$.map(result => [].concat(…result.map(item => item.subItems)) if the … Read more