Reputation: 1863
I'd like to merge two items arrays into one. I use for this the Exp.apply method. But the result contains only items from the second array.
Sample
The expected result should be
{ items:[{ name:'xxx' }, { name2:'yyy'}]})
Upvotes: 1
Views: 5496
Reputation: 74166
You can use array.push()
function:
var items = [{name: 'a'}];
items.push({name: 'b'}); // items = [{name: 'a'}, {name: 'b'}]
items = Ext.Array.merge([{name: 'a'}], [{name: 'b'}])
Upvotes: 6