Here is my sample array which contains the id and item and item notes description.
let sampleArr = [
{
id:1,
item:"item",
notes:["one"]
},
{
id:2,
item:"item2",
notes:["one","two"]
},
{
id:3,
item:"item3",
notes:["one","two"]
}
]
Here I want to add the notes into id:3 with the notes:"three" so I am expecting my final output should be like into the sample array.
{
id:3,
item:"item3",
notes:["one","two","three"]
}