How to iterate over a JSON array in Node.js?
var tables = [
{ "art":"A","count":"0","name":"name1","ean":"802.0079.127","marker":"null","stammkost":"A","tablename":"IWEO_IWBB_01062015" },
{ "art":"A","count":"0","name":"2","ean":"657.7406.559","marker":"null","stammkost":"A","tablename":"IWEO_IWBB_02062015" }
];
tables.forEach(function(table) {
var tableName = table.name;
console.log(tableName);
});
You need to de-serialize it to an object first.
var arr = JSON.parse(<your json array>);
for(var i = 0; i < arr.length; i++)
{
var tablename = arr[i].tablename;
}