Title: Having problem retrieve the data
Last modified: June 16, 2021

---

# Having problem retrieve the data

 *  Resolved [yichu](https://wordpress.org/support/users/yichu/)
 * (@yichu)
 * [5 years ago](https://wordpress.org/support/topic/having-problem-retrieve-the-data/)
 * The following is what I got from api call. I would like to show data in weatherElement
   array which is combined as elementName&elementValue.
 * I set basenode as location and template as
    {subloop-array:weatherElement:-1}{
   elementName}{elementValue} {/subloop:weatherElement}
 * but with no luck.
    Could you please give me some suggestion? Thanks!
 * {
    “success”: “true”, “result”: { “resource_id”: “O-A0001-001”, “fields”: [ {“
   id”: “lat”, “type”: “Double” }, { “id”: “lon”, “type”: “Double” }, { “id”: “locationName”,“
   type”: “String” }, { “id”: “stationId”, “type”: “String” }, { “id”: “obsTime”,“
   type”: “Timestamp” }, { “id”: “elementName”, “type”: “String” }, { “id”: “elementValue”,“
   type”: “String” }, { “id”: “parameterName”, “type”: “String” }, { “id”: “parameterValue”,“
   type”: “String” } ] }, “records”: { “location”: [ { “lat”: “24.144778”, “lon”:“
   121.264083”, “locationName”: “合歡山”, “stationId”: “C0H9C0”, “time”: { “obsTime”:“
   2021-06-16 16:00:00” }, “weatherElement”: [ { “elementName”: “TEMP”, “elementValue”:“
   11.7” }, { “elementName”: “HUMD”, “elementValue”: “1” }, { “elementName”: “PRES”,“
   elementValue”: “678.3” } ], “parameter”: [ { “parameterName”: “CITY”, “parameterValue”:“
   南投縣” }, { “parameterName”: “CITY_SN”, “parameterValue”: “13” }, { “parameterName”:“
   TOWN”, “parameterValue”: “仁愛鄉” }, { “parameterName”: “TOWN_SN”, “parameterValue”:“
   122” } ] } ] } }

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

 *  Thread Starter [yichu](https://wordpress.org/support/users/yichu/)
 * (@yichu)
 * [5 years ago](https://wordpress.org/support/topic/having-problem-retrieve-the-data/#post-14563029)
 * Hi!
 * I’m getting close to it! Thank you for making this plugin. Now I can start to
   do some experiment!
 * {subloop-array:location:-1}{subloop-array:location.weatherElement:-1}weatherElement.
   elementValue: {location.weatherElement.elementValue}
    {/subloop-array:location.
   weatherElement}
 *  Thread Starter [yichu](https://wordpress.org/support/users/yichu/)
 * (@yichu)
 * [5 years ago](https://wordpress.org/support/topic/having-problem-retrieve-the-data/#post-14564591)
 * I would like to know if there’s a way to specific point to an element inside 
   an array using surloop? For example, I would like to printout as following
 * temperature:11.7
    humidity:1 pressure:678.3
 * instead of the elementValue.
 * TEMP:11.7
    HUMD:1 PRES:678.3
 *     ```
       “weatherElement”: [
       {
       “elementName”: “TEMP”,
       “elementValue”: “11.7”
       },
       {
       “elementName”: “HUMD”,
       “elementValue”: “1”
       },
       {
       “elementName”: “PRES”,
       “elementValue”: “678.3”
       }
       ],
       ```
   
 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [5 years ago](https://wordpress.org/support/topic/having-problem-retrieve-the-data/#post-14565484)
 * Hi yichu,
 * unfortunately you can’t do that with the free plugin.
 * Bernhard

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

The topic ‘Having problem retrieve the data’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/having-problem-retrieve-the-data/#post-14565484)
 * Status: resolved