Here's a glimpse of my array, which is quite extensive with over 1000 objects:
data = [
{
code: '3019476',
_id: '60033f61-8a4e-4622-9731-decd07bc44e1',
vendor: 'DKNY',
info: ['array of objects'],
tags: [
{ type: 1, label: 'dsfs' },
{ type: 2, label: 'thisOne' },
{ type: 3, label: 'sdas' },
],
},
];
The goal here is to extract an array of objects where each object has one of the specified tag parameters.
Desired outcome:
data = [
{contains all data from the original object, but with the tag { type: 1, label: 'dsfs' },
{contains all data from the original object, but with the tag { type: 2, label: 'thisOne' },
{contains all data from the original object, but with the tag { type: 3, label: 'sdas' }
]