I have the following forEach loop over a JSON object named obj :
Object.keys(obj).forEach(function(){ });
How can I do this console.log both key and value for each element inside an object? Something like that:
Object.keys(obj).forEach(function(k, v){ console.log(k + ' - ' + v); });
Is it possible?
source share