Free Plugin: Show Data with subloop-array


Show data from


[jsoncontentimporter url=]
totalResults: {totalResults}
{subloop-array:entry:-1} entry.championship_name: {entry.championship_name}
{subloop-array:entry.standing:-1}entry.standing.team_name: {entry.standing.team_name}
{/subloop-array:entry.standing} {/subloop-array:entry} [/jsoncontentimporter]

In Action:

totalResults: 2
entry.championship_name: Regular Season Serie A2 Credem Banca – Girone Bianco
entry.standing.team_name: Synergy Arapi F.lli Mondovì
entry.standing.team_name: Monini Spoleto

PRO: JSON meets JCI and jQuery for a facet-search

Selecting a hotel for oyur holiday depends on options like location and price. With a facet-search you select several locations out of the all available and define a range for the price. Then the matcihing hotels should be displayed.

This can be done with the JCI-PRO-Plugin which grabs the JSON-data, builds a facet and shows the selected data. See here for an example.

To build that you need a data-source (JSON-API), the JCI-PRO-Plugin, jQuery-Libraries (maybe part of your WordPress-template or loadable via JCI) and twig-Software für the facet and the results.

See here how this can be done.


Show data from
Solution: PRO Plugin
Create a new JCI-Template with the above URL and this twig-code:
{% for c in carParks.carPark %}
{{c.definition.parkingRecord.parkingRecord.parkingNumberOfSpaces}} parkingNumberOfSpaces at 
{{ attribute(c.definition.parkingRecord.parkingRecord.parkingDescription.values.value, '#text') }} (id: {{ attribute(c, '@id') }})

parkingSiteStatus: {{c.status.parkingRecord.parkingRecordStatus.parkingSiteStatus }}
parkingSiteOpeningStatus: {{c.status.parkingRecord.parkingRecordStatus.parkingSiteOpeningStatus}}
measurementOrCalculationTime: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.measurementOrCalculationTime | date("d.m.Y, H:i") }}
fillRate: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.fillRate.vehicleFlowRate}}
exitRate: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.exitRate.vehicleFlowRate}}
{% endfor %}
Then use the Shortcode Continue reading “PRO:”

API: with free and PRO Plugin

Challenge: Display data from the API
Free JCI-Plugin:
[jsoncontentimporter url=] <br>
{subloop:today.stationData.symbol:-1} <br>
{today.stationData.symbol.description}: {today.stationData.min}-{today.stationData.max}<br>
{/subloop:today.stationData.symbol} <br>
{/subloop-array:today.stationData} <br>
{/subloop:today} <br>

PRO JCI-Plugin:
Continue reading “API: with free and PRO Plugin”

API: with free and PRO JCI-Plugin

Show data from
Solution with the free JCI-Plugin:
[jsoncontentimporter url=]
reported_volume_24h = {quotes.TRY.reported_volume_24h}

In Action:
reported_volume_24h = 68503846.3082
Solution with the PRO JCI-Plugin:
Create a template with URL and this twig-code:
{% set lire = quotes.TRY.reported_volume_24h|split('.') %}
reported_volume_24h = {{lire.0 | formatnumber(0, '', ',') }}.{{lire.1}}

Store this JCI-Template and use it in a shortcode in this way:
[jsoncontentimporterpro id=_NO_OF_TEMPLATE convertjsonnumbers2strings=yes]

In Action:
reported_volume_24h = 68,503,846.30823986

Numbers and Strings in free and PRO plugin

Numbers and Strings:
See this JSON:
{"num": 3.5050, "str": "3.4040" }

There is a little difference: “num” is without quotation marks, “str” is with. The JSON Content Importer Plugin and the PHP behind that handles the “num” as numeric data and removes the 0 at the end.
Free jsoncontentimporter:
[jsoncontentimporter url=]num: {num}, str:  {str}[/jsoncontentimporter]

gives us this:
num: 3.505, str: 3.4040
To “save” the 0 you need the PRO plugin – unfortunately: There “convertjsonnumbers2strings=yes” converts the JSON to do this.
[jsoncontentimporterpro url= convertjsonnumbers2strings=yes  parser=twig]
{{num}} {{str}}[/jsoncontentimporterpro]

gives us this:
num: 3.5050, str: 3.4040