Title: Parsing array from query
Last modified: March 1, 2019

---

# Parsing array from query

 *  Resolved [doooot](https://wordpress.org/support/users/doooot/)
 * (@doooot)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/parsing-array-from-query/)
 * 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&#8243](https://bgg-json.azurewebsites.net/thing/167791&#8243);]
   
   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](https://wordpress.org/support/users/doooot/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparsing-array-from-query%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/parsing-array-from-query/#post-11266126)
 * 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](https://wordpress.org/support/users/doooot/)
 * (@doooot)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/parsing-array-from-query/#post-11266317)
 * 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](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/parsing-array-from-query/#post-11266965)
 * >  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.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)

 * 3 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/parsing-array-from-query/#post-11266965)
 * Status: resolved