I have following array
[{
"games1": [{
"playername": "1"
}]
},
{
"games2": [{
"playername": "1"
},
{
"playername": "2"
}
]
}
]
I want to delete games2 from the array how to do this
I want this type of output
[{
"games1": [{
"playername": "1"
}]
}
}]
3
Answers
Use filter to filter what you want to keep.
Like this:
output would be
Try the below code:
here the output of the ‘final’ is :