My question goes like this. I have a JSON object below. I want to remove the object that has an assignment 1. I already looped through it and by the best of me I cannot seem to remove that particular object.
0: Object
teller_id: 1
details: CASH
assignments: Array [2]
0: Object <---- Remove this Object and all the elements indside it
service_id: 1
status: 1
assignment: 1
1: Object
service_id: 1
status: 1
assignment: 2
1: Object
teller_id: 2
details: EMP
assignments: Array [2]
0: Object
service_id: 2
status: 3
assignment: 4
1: Object
service_id: 2
status: 4
assignment: 6
Remove object with an assignment of 1
0: Object
teller_id: 1
details: CASH
assignments: Array [2]
1: Object
service_id: 1
status: 1
assignment: 2
1: Object
teller_id: 2
details: EMP
assignments: Array [2]
0: Object
service_id: 2
status: 3
assignment: 4
1: Object
service_id: 2
status: 4
assignment: 6
In which it removes the Object[0] found inside the assignments array. Thanks