What’s the best/standard way of merging two associative arrays in JavaScript? Does everyone just do it by rolling their own for loop?
for
Here is the best solution.
obj1.unshift.apply( obj1, obj2 );
Also, obj1 can grow inside a loop without any problem. (lets say obj2 is dynamic)
obj1
obj2