Challenge:
Show data from https://api.coinpaprika.com/v1/exchanges/paribu?quotes=TRY
Local stored at https://api.json-content-importer.com/extra/json/coinpaprika.json
Free JCI:
[[jsoncontentimporter url=https://api.json-content-importer.com/extra/json/coinpaprika.json] {subloop:quotes:-1} {subloop:quotes.TRY:-1} reported_volume_24h = {quotes.TRY.reported_volume_24h} {/subloop:quotes.TRY} {/subloop:quotes} [/jsoncontentimporter]]
In Action:
Note the rounded number!
PRO JCI:
twig-template:
Note how formatnumber is used. First we separate the number before and after the decimal point. Then we use formatnumber for the number before the decimal point only.
quotes.TRY.reported_volume_24h: {{quotes.TRY.reported_volume_24h}}<br> {% set lire = quotes.TRY.reported_volume_24h|split('.') %} reported_volume_24h = {{lire.0 | formatnumber(0, '', ',') }}.{{lire.1}}
Shortcode:
convertjsonnumbers2strings=yes converts numbers into strings. Otherwise WordPress / PHP would round those numbers.
[[jsoncontentimporterpro id=_NO_OF_TEMPLATE convertjsonnumbers2strings=yes]]
In Action:
quotes.TRY.reported_volume_24h: 1243624306.492943reported_volume_24h = 1,243,624,306.492943