Subloop with numerical name
-
Hi there,
I’m trying to implement a JSON import using a weather JSON object, it would display each weather warning information object that is sent. However the plugin doesn’t seem to fetch the data from a subloop with a numerical name, if I test the data and change the object name to a text-based one, my code works.
Currently this is the shortcode I have:
[jsoncontentimporter url="https://next.json-generator.com/api/json/get/4yW3x72b8" debugmode=10] <div class="weatherWarning"> <h3>Status: {Status}</h3> <hr /> {subloop:1:-1} <ul> <li>{Type:ifNotEmptyAddLeft:Type:}</li> <li>{Start:ifNotEmptyAddLeft:Start Time of Warning:}</li> <li>{End:ifNotEmptyAddLeft:End of Warning:}</li> <li>{Text:ifNotEmptyAddLeft:Description:}</li> <li>{Issued:ifNotEmptyAddLeft:Date Warning Issued:}</li> </ul> {/subloop:1} </div> [/jsoncontentimporter]Using this data: https://next.json-generator.com/api/json/get/4yW3x72b8
For example, if I change the subloop and object name to ‘One’ instead of ‘1’. it displays correctly. However this is an external weather API so I cannot change the object name. Do you have any tips?
Thank you.
The topic ‘Subloop with numerical name’ is closed to new replies.