Here is the structure of my array:
const array = [
{
'12345': [
{
name: 'item one',
numbers: ['12345', '77484'],
},
{
name: 'item two',
numbers: ['12345', '65456'],
},
{
name: 'item three',
numbers: ['12345', '33920'],
},
{
name: 'item four',
numbers: ['12345', '99393'],
},
],
},
{
'67890': [
{
name: 'item one b',
numbers: ['67890', '33232'],
},
{
name: 'item two b',
numbers: ['67890', '33456'],
},
{
name: 'item three b',
numbers: ['67890', '77665'],
},
{
name: 'item four b',
numbers: ['67890', '11234'],
},
],
},
]
console.log(array);
If I have a dynamic variable like 'item three b', how can I locate and delete that specific entry within the nested arrays?
I'm facing some challenges accessing the deeply nested arrays.
Appreciate any help!