I have following array
let newArray = [
{
"conterTop": {
"uncategroized": [item1, item2, item3],
"categroized": [item4, item5]
}
},
{
"flooring": {
"uncategroized": [item1, item2, item3],
"categroized": [item4, item5]
}
}
]
I'm pushing countertop & flooring on runtime. Now I need to check if countertop already exists in newArray, it should not push countertop again. I have tried newArray.includes() but it's not working. Please any suggestion?