• Resolved teemberland

    (@teemberland)


    Hi this is my JSON

    { 
      "october": {
        "perfect_stats": {
          "grounder": [
            {
              "tot_pp": "6,422,975",
              "pct_all_pp": "16.1%"
            }
          ]
        }
      }
    }
    

    How can I get tot_pp and pct_all_pp? I’m using ‘october’ as basenode. I’ve tried…

    {subloop:perfect_stats:-1}{subloop-array:grounder:-1}{grounder.tot_pp}{/subloop-array:grounder}{/subloop:perfect_stats}

    But it’s not working. Maybe it’s not possible?

    EDIT:

    I think I figured it out. I updated the basenode value to october.perfect_stats and did this:

    {subloop-array:grounder:-1}{grounder.tot_pp}{/subloop-array:grounder}

    • This topic was modified 3 years, 3 months ago by teemberland.
Viewing 1 replies (of 1 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    try

    [jsoncontentimporter url=https://wptest.kux.de/extra/json/october.json basenode=october]
    {subloop:perfect_stats:-1}
    {subloop-array:perfect_stats.grounder:-1}
    tot_pp: {perfect_stats.grounder.tot_pp}
    {/subloop-array:perfect_stats.grounder}
    {/subloop:perfect_stats}
    [/jsoncontentimporter]

    Bernhard

Viewing 1 replies (of 1 total)
  • The topic ‘Need Help Accessing Array Value’ is closed to new replies.