Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to join two Angular Array Objects

Posted on 2013-12-12
4
Medium Priority
?
302 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

971 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