With an array like the following, how can I filter objects based on the texts.id? For example if I wanted to return this very same array without the texts object reffering to the id 123 how would I go about it? I have access to the id I want to filter out and also the name of the object where its located. I have been trying to figure this out but I am not sure this is doable with the filter method only. Thanks in advance to anyone that helps.
[
0: Object {
name: 'Name 1',
texts[
0: Obj{
id: '123',
body: 'test message'
},
1: Obj{
id: '456',
body: 'test message 2'
}
]
},
1: Object {
name: 'Name 2',
texts[
0: Obj{
id: '789',
body: 'test message3'
},
1: Obj{
id: '101112',
body: 'test message 4'
}
]
}
]
textsproperty of each member of the outer array.