Template Syntax too difficult
-
{
“uuid”: “a6ee8177-107b-47dd-bcfd-30960ccc6e9c”,
“number”: “2730010”,
“shortname”: “K?LN”,
“longname”: “K?LN”,
“km”: 688,
“agency”: “WSA RHEIN”,
“longitude”: 6.963300159749653,
“latitude”: 50.93694925646438,
“water”: {
“shortname”: “RHEIN”,
“longname”: “RHEIN”
},
“timeseries”: [
{
“shortname”: “W”,
“longname”: “WASSERSTAND ROHDATEN”,
“unit”: “cm”,
“equidistance”: 15,
“currentMeasurement”: {
“timestamp”: “2021-02-02T17:00:00+01:00”,
“value”: 824,
“trend”: 1,
“stateMnwMhw”: “high”,
“stateNswHsw”: “normal”
},
“gaugeZero”: {
“unit”: “m. ü. NHN”,
“value”: 35.038,
“validFrom”: “2019-11-01”
}
},
{
“shortname”: “Q”,
“longname”: “ABFLUSS_ROHDATEN”,
“unit”: “m3/s”,
“equidistance”: 15,
“currentMeasurement”: {
“timestamp”: “2021-02-02T15:45:00+01:00”,
“value”: 6870,
“trend”: 0
}
},
{
“shortname”: “WT”,
“longname”: “WASSERTEMPERATUR ROHDATEN”,
“unit”: “°C”,
“equidistance”: 15,
“currentMeasurement”: {
“timestamp”: “2021-02-02T17:00:00+01:00”,
“value”: 6.4,
“trend”: 0
}
}
]
}
and i want to get the single value from timeseries.currentMeasurement.value (824) but i couldn’t figure out, how.
tried:
{subloop:timeseries:-1}
{subloop-array:timeseries.currentMeasurement:-1}
{timeseries.CurrentMeasurement.value}
{/subloop:timeseries}
…no way…It seems easier to explode() the JSON in PHP and getting it via => than using this artifial Subloop/subloop-array syntax with this plugin.
- The topic ‘Template Syntax too difficult’ is closed to new replies.