Sorry if the title is not properly worded. My question is this one, I have an array of objects:
[
{ "id": "11", "name": "First", "exercises": [] },
{ "id": "12", "name": "Second", "exercises": [] },
{ "id": "13", "name": "Third", "exercises": [] },
{ "id": "14", "name": "Fourth", "exercises": [] }
];
How can I add/insert this object:
{ "id": 1, "name": "Squats", "reps": 12, "weight": 15, "note": "This is a note" }
in the property “exercises” of the id 12?