This is the format of the JSON object I am trying to retrieve field TEMP from.
[
[
{
"DEVICE_ID": "357807272",
"TEMP": 20.439
}
]
]
This is the format of the JSON object I am trying to retrieve field TEMP from.
[
[
{
"DEVICE_ID": "357807272",
"TEMP": 20.439
}
]
]
Use javascript filter to retrieve objects, please find below code snippet:
var heroes = [
{name: 'Batman', franchise: 'DC'},
{name: 'Ironman', franchise: 'Marvel'},
{name: 'Thor', franchise: 'Marvel'},
{name: 'Superman', franchise: 'DC'}
];
var marvelHeroes = heroes.filter(function(hero) {
return hero.franchise == 'Marvel';
});
console.log(marvelHeroes);