11
JavaScript bucle a través de json array
Estoy tratando de recorrer la siguiente matriz json: { "id": "1", "msg": "hi", "tid": "2013-05-05 23:35", "fromWho": "hello1@email.se" }, { "id": "2", "msg": "there", "tid": "2013-05-05 23:45", "fromWho": "hello2@email.se" } Y he intentado lo siguiente for (var key in data) { if (data.hasOwnProperty(key)) { console.log(data[key].id); } } Pero por alguna …
151
javascript
json