Asked 6 years ago
22 Feb 2018
Views 10591
jaggy

jaggy posted

.forEach is not a function in javascript


 r2groupby.forEach(function(r){
 console.log(r)
 
 });



Uncaught TypeError: r2groupby.forEach is not a function


Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00


console.log(typeof r2groupby);


if it typeof is object . forEach is not work with it

use lodash.forEach instead


 lodash.forEach(r2groupby,function(r){
 console.log(r);
 
 });
Post Answer