JSFiddle - React, Tailwind, and code Playground

by grant

JavaScript

var data = {
"@context": [
"https://geojson.org/geojson-ld/geojson-context.jsonld",
{
"@version": "1.1",
"wmoUnit": "https://codes.wmo.int/common/unit/",
"nwsUnit": "https://api.weather.gov/ontology/unit/"
}
],
"id": "https://api.weather.gov/gridpoints/BOI/137,91",
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-116.1134996,
43.7716455
],
[
-116.1088713,
43.7503528
],
[
-116.0794157,
43.7536903
],
[
-116.0840378,
43.7749833
],
[
-116.1134996,
43.7716455
]
]
]
},
"properties": {
"@id": "https://api.weather.gov/gridpoints/BOI/137,91",
"@type": "wx:Gridpoint",
"updateTime": "2020-12-31T21:51:17+00:00",
"validTimes": "2020-12-31T15:00:00+00:00/P7DT10H",
"elevation": {
"unitCode": "wmoUnit:m",
"value": 1991.868
},
"forecastOffice": "https://api.weather.gov/offices/BOI",
"gridId": "BOI",
"gridX": "137",
"gridY": "91",
"temperature": {
"uom": "wmoUnit:degC",
"values": [{
"validTime": "2020-12-31T15:00:00+00:00/PT3H",
"value": -3.3333333333333335
},
{
"validTime": "2020-12-31T18:00:00+00:00/PT6H",
"value": -2.2222222222222223
}]
}}
}

console.log(data.properties.temperature.values[0].value);

$.each(data.properties.temperature.values, function(index, element) {
    alert(element.value); 
});