Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have this data:

 $scope.data = [
        {
            data1:"1",
            data2:"2"

        },
        {
            data1:"1",
            data2:"2"
        }
      ];

I want to output them in console log as:

[ [1,2], [1,2] ]

Any suggestions please.

share

1 Answer 1

Yao,

Look at Lodash or ngLodash. Lodash has lots of function that do exactly what you are looking to do. ngLodash is a fork and AngularJS rewrite of Lodash.

https://github.com/rockabox/ng-lodash

https://lodash.com

Hope this helps!

Regards, Jeff

share

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.