How do I iterate over this array in array in AngularJS Javascript
code:
[[4,5,6,4,8.7]]
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
|
An array is an array. Use Array.prototype.forEach for iteration. In this case, each item is an array, and therefore you have an inner forEach as well. Angular also has a method for forEach. It's called angular.forEach.
P.s. to avoid the smartass that is going to say that Array.prototype.forEach wont work on IE8, then it doesn't. |
|||
|
You can use 'angular.forEach'.
|
|||
|