Javascript concatenate properties from multiple objects (associative array)
- by Vlad
I am looking for the best way to augment multiple javascript associative arrays.
For example the following code
a = { "one" : 1, "two" : 2 };
b = { "three" : 3 };
c = { "four" : 4, "five" : 5 };
d = Collect(a,b,c)
Should result in value of d being:
{ "one" : 1, "two" : 2, "three" : 3, "four" : 4, "five" : 5 };
What is the best way to do this?