vm.array1.push(content1); vm.array2.push(content2);
I have a above two arrays with a data of objects pushed at each time and the data modal of each
Plz check may this will be work:-
for(var i=0;i<=vm.array1.length;i++) { for(var j=0;j<=vm.array2.length;j++) { if(i==j) vm.save(vm.array1[i].content1,vm.array2[j].content2){ //save functionality success by calling API } } }