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=http://api.json-content-importer.com/extra/json/number.json]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=http://api.json-content-importer.com/extra/json/number.json convertjsonnumbers2strings=yes  parser=twig]
{{num}} {{str}}[/jsoncontentimporterpro]

gives us this:
num:3.5050, str:3.4040

Free JCI Plugin: Data from playlist with basenode and without

JSON: https://cast02.siamsa.ie/public/radio_siamsa/api/live/nowplaying/radio_siamsa
Solution:
[jsoncontentimporter url=https://cast02.siamsa.ie/public/radio_siamsa/api/live/nowplaying/radio_siamsa basenode=now_playing.song] {text}<img src={art}> [/jsoncontentimporter]
or:
[jsoncontentimporter url=https://cast02.siamsa.ie/public/radio_siamsa/api/live/nowplaying/radio_siamsa] {subloop:now_playing:-1} {subloop:now_playing.song:-1} {now_playing.song.text}<img src={now_playing.song.art}> {/subloop:now_playing.song} {/subloop:now_playing} [/jsoncontentimporter]

Books: Current Bestseller

With the free JSON Content Importer Plugin you can display the New York Times Bestseller-Booklist:

Code for that:
[jsoncontentimporter url=https://api.nytimes.com/svc/books/v3/lists/current/hardcover-fiction.json?api-key=YOUR_NYT_API_BOOK_KEY basenode=results] {list_name}<br>{subloop-array:books:-1}<img src="{books.book_image}" title="{books.title}" align="left" width="40" hspace="5"> {books.rank}. <a href="{books.amazon_product_url}" target="_blank">{books.title}</a><br>{books.description}<br clear="all"> <hr>{/subloop-array:books} [/jsoncontentimporter]


In action:

Hardcover Fiction
1. THE CELLIST
The 21st book in the Gabriel Allon series. A private intelligence service plans an act of violence that will aid Russia and divide America.


2. THE PAPER PALACE
After an extramarital dalliance, Elle must choose between her husband and her childhood love.

3. THE LAST THING HE TOLD ME
Hannah Hall discovers truths about her missing husband and bonds with his daughter from a previous relationship.

4. IT'S BETTER THIS WAY
Julia Jones begins a new life after discovering her husband’s infidelity almost six years ago.

5. MALIBU RISING
An epic party has serious outcomes for four famous siblings.

6. THE PRESIDENT'S DAUGHTER
Matthew Keating, a past president and former Navy SEAL, goes on his own to find his abducted teenage daughter.

7. NINE LIVES
After tragedy upsets her stable family life, Maggie must decide if she will take a risk with a thrill seeker.

8. THE MIDNIGHT LIBRARY
Nora Seed finds a library beyond the edge of the universe that contains books with multiple possibilities of the lives one could have lived.

9. THE PERSONAL LIBRARIAN
A Black woman who becomes one of the most powerful people in the art and book world is forced to hide her true identity.

10. FALLING
A kidnapper demands that a pilot crash his plane with 144 passengers onboard to save his family.

11. THE FINAL GIRL SUPPORT GROUP
At a gathering that has taken place for more than a decade, women who survived unthinkable ordeals worry about a missing member.

12. GOLDEN GIRL
A Nantucket novelist gets one final summer to watch what happens from the great beyond.

13. PROJECT HAIL MARY
Ryland Grace awakes from a long sleep alone and far from home, and the fate of humanity rests on his shoulders.

14. THE MAIDENS
A therapist suspects a Greek tragedy professor at Cambridge University of committing murder.

15. THE FOUR WINDS
As dust storms roll during the Great Depression, Elsa must choose between saving the family and farm or heading West.

JCI and casino.chompcasino.com

Challenge: Load https://casino.chompcasino.com/content/chomp-casino/json/2.1/manifest_multicurrency.json and display those game-items containing a defined title.

Solution: Create a new JCI-template with the following settings.
URL: https://casino.chompcasino.com/content/chomp-casino/json/2.1/manifest_multicurrency.json
urlparam4twig : t

Twig code in template:

{% set t = 'Mont' %}
{% if urlparam.t %}
{% set t = urlparam.t %}
{% endif %}
term: {{t}}<br>
{% for g in games if g.title matches '/'~t~'/i'  %}
title: {{g.title}}<br>
{% for i in g.images %}
{{i.url}}
{% endfor %}
<hr>
{% endfor %}

Create new page with this Shortcode: [jsoncontentimporterpro id=NUMBER_OF_JCI_TEMPLATE]

In Action:

Try also this: http://api.json-content-importer.com/jci-and-casino-chompcasino-com/?t=romance

term:Mont
title:Montezuma
/content/all/images/montezuma/banner.jpg/content/all/images/montezuma/tile.jpg

JCI and TablePress

The Plugin “TablePress” and the PRO version of the JSON Content Importer can work together in this way:

  1. Create a new TablePress-Table with e. g. two columns and two rows. Fill the cells with some dummy text. This gives you a shortcode [table id=NUMBER_OF_TABLEPRESS_TABLE].

  2. Create a new JCI-Plugin Template with e. g. some JSON data. The Twig-Code is

    name: {{_context.0.name}}
    [table id=NUMBER_OF_TABLEPRESS_TABLE /]
    
  3. Create a new WordPress-Page/Post with this shortcode:
    [jsoncontentimporterpro nameoftemplate=NAME_OF_JCI_TEMPLATE orderofshortcodeeval=2]
    

    Preview this page: You should see some “name”-Data and a Table.

  4. Then change the content of a Table-Cell and insert {{_context.0.name}} there.

  5. Preview again and you should see the JSON-data in the Table.

If the number of columns or rows is dynamic: Up to my knowledge TablePress has a fixed number of cols and rows. So this is not that flexible.
Maybe Table Sort is an option then.

JCI and Table Press in Action:

name:Love Breakfast
1a:Love Breakfast1b
2a2b