I have a question about the possibility of extending an array of objects like this:
Imagine I have :
myObj = [
{"name" : "one", "test" : ["1","2"]},
{"name" : "two", "test" : ["1","2"]}
]
And I want to add to it something like -
{"name" : "one" , "test" : ["1","3"]}
The expected result would be -
myObj = [
{"name" : "one", "test" : ["1","2", "3"]},
{"name" : "two", "test" : ["1","2"]}
]
Essentially, if the object doesn't exist, it should be created. Is this type of operation possible? Appreciate any insights! Thanks!