I have an array of data similar to this structure:
const array = [
{
name: 'name',
tags: [
{
name: 'xxxx',
url: '/this',
},
],
},
{
name: 'name',
tags: [
{
name: 'xxxxxxx',
url: '/that',
},
],
},
];
I would like to return for example, the objects that contain only the url:'this'.
i tried to map the outer array first, and then using filter in the nested tag array, but without any luck. Any suggestions? thanks