I'm wondering if something like this is possible - an extend that looks at an array of objects
Lets say I have :
myObj = [
{"name" : "one", "test" : ["1","2"]},
{"name" : "two", "test" : ["1","2"]}
]
And I'm trying to extend into that
{"name" : "one" , "test" : ["1","3"]}
So the result would be -
myObj = [
{"name" : "one", "test" : ["1","2", "3"]},
{"name" : "two", "test" : ["1","2"]}
]
And this would be like extend in that if there is no object there it would just create one. IS something like this possible? Thanks!
["1","2"]and["1","3"]become["1","2","3"]? How should the final order be in an arbitrary case?