showing results for - "como percorrer um objeto js"
Hector
16 Jan 2016
1var obj = {
2  "column01": "Coluna 01",
3  "column02": "Coluna 02"
4}
5
6Object.keys(obj).forEach(function(item){
7 console.log(item + " = " + obj[item])
8})
9
10for (var property in obj){
11  console.log(property + " = " + obj[property]);
12}
Karl
23 Oct 2016
1// Requiring the lodash library 
2// console:  npm i --save lodash
3const _ = require("lodash")
4
5// Use of _.forEach() method
6
7_.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
8  console.log(key)
9})