Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to join two Angular Array Objects

Posted on 2013-12-12
4
Medium Priority
?
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to dynamically set the form action using jQuery.

660 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