Support » Plugin: JSON Content Importer » how to select a single value from array

  • Resolved joshuamt

    (@joshuamt)


    Hello

    I am having trouble selecting 1 value out an array and dont know if i need the pro version or not to do it. The example i need help with would be selecting 1 value out of an array but only that one value (such as just the fifth or just the third or just the first ect.) I cant give you the json link but an example of its contents are below. I want to just display the one of the “Data” values from “Attribute” and not all of them.
    At the moment im just using this as the code but it displays everything.

    [jsoncontentimporter url=”myjson.json” basenode=”Page.table.TableInfo.Column”]
    {subloop-array:Attribute:10}
    {Data:html}
    {/subloop-array:Attribute}
    [/jsoncontentimporter]

    Thanks.

    “table”: {
    “TableIntro”: null,
    “TableType”: “RegularColumns”,
    “Description”: “Table Component”,
    “Version”: “1.0”,
    “StickyNav”: null,
    “Title”: null,
    “ComponentName”: “a”,
    “TableInfo”: {
    “Column”: {
    “Attribute”: [
    {
    “Type”: “V”,
    “Data”: “2”
    },
    {
    “Type”: “V”,
    “Data”: “3”
    },
    {
    “Type”: “V”,
    “Data”: “4”
    },
    {
    “Type”: “V”,
    “Data”: “5”
    },
    {
    “Type”: “V”,
    “Data”: “6”
    },
    {
    “Type”: “V”,
    “Data”: “7”
    }
    ]
    }
    },

Viewing 1 replies (of 1 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    for that you need the pro plugin, sorry.
    There the twig-parser is much more powerful.

    Sorry about that,
    Bernhard

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.