Need Help Accessing Array Value
-
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}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Need Help Accessing Array Value’ is closed to new replies.