• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Need to join two Angular Array Objects

I need to join two javascript json arrays and push the concat into one

                for (var z = 0; i < data.length; z++) {
                    var dlist = data[z];
                              
                    for (var j = 0; j < verifyWMRList.length; j++) {

                        var vlist = verifyWMRList[j];

                        if (dlist.Email == vlist.CRMMemberEmail) {                            

Right here I need dlist and vlist to be 1 array row and push it onto my $scope.items

                            $scope.items.push(   Joined Array );
                           
                        }

                    }
                }

Open in new window


Thank  You
0
Charles Baldo
Asked:
Charles Baldo
  • 2
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
what about :

$scope.items.push(   dlist.concat( vlist )   );
0
 
Charles BaldoSoftware DeveloperAuthor Commented:
clever but I get an error

Error: dlist.concat is not a function
0
 
leakim971PluritechnicianCommented:
Try this :
$scope.items.push(   dlist   );
$scope.items.push(   vlist   );
0
 
Charles BaldoSoftware DeveloperAuthor Commented:
Thnaks Again your help made the diff
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now