Solved

Need to join two Angular Array Objects

Posted on 2013-12-12
4
296 Views
Last Modified: 2013-12-13
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
Comment
Question by:Charles Baldo
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39715497
what about :

$scope.items.push(   dlist.concat( vlist )   );
0
 

Author Comment

by:Charles Baldo
ID: 39715511
clever but I get an error

Error: dlist.concat is not a function
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39715520
Try this :
$scope.items.push(   dlist   );
$scope.items.push(   vlist   );
0
 

Author Closing Comment

by:Charles Baldo
ID: 39716767
Thnaks Again your help made the diff
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question