Example
DEBUG: wp_remote_get to http://sulistrowiczki.sobotka.pl/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.jsonDEBUG: arguments: Array ( [timeout] => 5 )
DEBUG: success getting URL
If you use WordPress without Gutenberg, you can use this Shortcode (copy with Strg+A, paste to TEXT-editor!):
api-answer:
Inspect JSON: Copypaste (click in box, Strg-A marks all, then insert into clipboard) the JSON from the following box to https://jsoneditoronline.org):
template:
test2:
{subloop-array:level2:-1} level2: {level2.key}
{subloop:level2.data:-1} id: {level2.data.id}, type: {level2.data.type}
{/subloop:level2.data} {/subloop-array:level2}
result:
Plugin-Settings (see Plugin options):
Cache: disabled
oauth Bearer Accesskey:
http-Header default Useragent:
the real result:
test1 Very good, this is the value of 'start', right out of the JSON-data
test2:
level2: This is the first value of key in the 'level1'-array
id: 11111, type: aaaa
level2: This is the second value of key in the 'level1'-array
id: 222, type: bbbb
level2: This is the third value of key in the 'level1'-array
id: 33333333, type: aaaa
level2: This is the fourth value of key in the 'level1'-array
id: 4444, type: aaaa