I am trying to access an specific attribute in a json array. I've already looked here and it helped me for the general understanding but for my specific use case it does not work.
The json looks like this:
{
"uuid": "3a8ed45f-28e7-4263-8437-d926c6a194f4",
"number": "3310010",
"shortname": "FUESTRUP",
"longname": "FUESTRUP",
"km": 102.177,
"agency": "WSA RHEINE",
"longitude": 7.680240800859249,
"latitude": 52.04026675873374,
"water": {
"shortname": "EMS",
"longname": "EMS"
},
"timeseries": [{
"shortname": "W",
"longname": "WASSERSTAND ROHDATEN",
"unit": "cm",
"equidistance": 15,
"gaugeZero": {
"unit": "m. ü. NN",
"value": 35.69,
"validFrom": "1952-02-01"
}
}]
}
Now I want to access the value-Property within the gaugeZero-Collection within the timeseries-array. I've already tried to do this by using:
data.timeseries[0].longname.gaugeZero.value
but this does not work (it's undefinied).
Thanks for your help!