Title: Template Syntax too difficult
Last modified: February 2, 2021

---

# Template Syntax too difficult

 *  Resolved [major67](https://wordpress.org/support/users/major67/)
 * (@major67)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/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”: “
   m³/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.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [major67](https://wordpress.org/support/users/major67/)
 * (@major67)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/template-syntax-too-difficult/#post-13993580)
 * The API access is public: [https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c.json?includeTimeseries=true&includeCurrentMeasurement=true](https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c.json?includeTimeseries=true&includeCurrentMeasurement=true)
 * Tried some other ways to “walk” the JSON “down”, but i gave up. I have done this
   in PHP once a time ago and it was SO easy to parse the JSON.
 * The only thing i got is the root values like uuid, number, shortname and so on.
   Couldn’t get any value in the following ‘timeseries’-array.
 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/template-syntax-too-difficult/#post-13999112)
 * Hi,
 * you were very close – try this, please:
 *     ```
       [jsoncontentimporter url=https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c.json?includeTimeseries=true&includeCurrentMeasurement=true]
       {subloop-array:timeseries:1}{timeseries.longname}
       {subloop:timeseries.currentMeasurement:1}{timeseries.currentMeasurement.value}{/subloop:timeseries.currentMeasurement}
       {/subloop-array:timeseries}
       [/jsoncontentimporter]
       ```
   
 * Bernhard
    Munich

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Template Syntax too difficult’ is closed to new replies.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/template-syntax-too-difficult/#post-13999112)
 * Status: resolved