We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    This is possible with the next coming release of MIGX (2.5.12) or with this mod:
    https://github.com/Bruno17/MIGX/commit/7fed923f741a56b7cdf0166a4dec6224c3517021#diff-02f4fc20c3fb8a39c0a78fda75f1d1e2L199

    Got the question how to parse nested json-strings with a snippet.
    Here's the answer how to get this done with getImageList.

    The outer getImageList:

    [[getImageList? 
    &value=`[
    {
        "object":"house1",
        "appartements": [
                {"Obj_ID":"3A01",
                 "Etage":"EG"
                },
                {"Obj_ID":"3A02",
                 "Etage":"2.OG"
                }
            ]
    },
    {
        "object":"house2",
        "appartements": [
                {"Obj_ID":"3B01",
                 "Etage":"2.OG"
                },
                {"Obj_ID":"3B02",
                 "Etage":"1.OG"
                }
            ]
    }
    ]`
    &placeholdersKeyField=``
    &tpl=`houseTpl`
    ]]
    


    the chunk 'houseTpl':

    <h2>[[+object]]</h2>
    Appartements:
    <table>
    [[getImageList? 
    &value=`[[+appartements]]`
    &placeholdersKeyField=``
    &tpl=`appartementTpl`
     ]]
    </table>
    


    the chunk 'appartementTpl':

    <tr>
    <td>[[+Obj_ID]]</td>
    <td>[[+Etage]]</td>
    </tr>
    
    [ed. note: Bruno17 last edited this post 10 years, 4 months ago.]
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!