My array looks like, but includes 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' },
],
},
];
So I am trying to get is an array of objects, all of which are the same, but each one has one of the tags params.
Expected output:
data = [
{all data that object that i had contains, but tag is { type: 1, label: 'dsfs' },
{all data that object that i had contains, but tag is { type: 2, label: 'thisOne' },
{all data that object that i had contains, but tag is { type: 3, label: 'sdas' }
]