• Resolved doooot

    (@doooot)


    I want to get the list/array in the “mechanics” and other sections, but I can’t figure out how to get it.

    This is my code so far

    [jsoncontentimporter url=”https://bgg-json.azurewebsites.net/thing/167791″ ]
    Game Name: {name}
    Player Count: {minPlayers}-{maxPlayers}
    Max Playing Time: {playingTime}
    Year Published: {yearPublished}
    Rating: {averageRating}
    [/jsoncontentimporter]

    • This topic was modified 7 years, 3 months ago by doooot.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    try

    [jsoncontentimporter url=”https://bgg-json.azurewebsites.net/thing/167791″ ]
    Game Name: {name}
    Player Count: {minPlayers}-{maxPlayers}
    Max Playing Time: {playingTime}
    Year Published: {yearPublished}
    Rating: {averageRating}
    mechanics:
    {subloop-array:mechanics:10}{0}, {1}, {2}
    {/subloop-array:mechanics}
    [/jsoncontentimporter]

    If the length of ther mechanics-list is dynamic: The free plugin can handle this only in this way. The pro plugin is way more felxible here.

    Bernhard

    Thread Starter doooot

    (@doooot)

    Hi
    This was so close to what I tried, but forgot the elements and that the “mechanics” should also be in the closing element.
    The length does vary, seems like I can just insert more element (for example on a new line) and it only displays the number there is – of course this doesn’t work with a comma separated list like your example “the last comma was shown”.

    This does make my post unnecessary long.

    Plugin Author berkux

    (@berkux)

    of course this doesn’t work with a comma separated list like your example “the last comma was shown”.

    yes, that’s the way it is

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parsing array from query’ is closed to new replies.