i have this arrays about users and i have another object about brands, but i want to match user's brand with brands
let users = [{
...data
brand: 'RET'
},
{
...data
brand: 'CAT'
}
]
this is the brands object
let brands = {
TYS: 81,
RET: 62,
CAT: 90,
NK: 87,
}
if an user have the brand then i have to mark yes is brands like this
let brands = {
TYS: {
value: 81,
exist: 'No'
},
RET: {
value: 62,
exist: 'Yes'
},
CAT: {
value: 90,
exist: 'Yes'
},
NK: {
value: 90,
exist: 'No'
}
}