Is it possible to have nested lists parameters?

Hey guys!

I am trying to see if it is possible to make nested list parameters work because when I tried the same approach, the consumer does not give any values. To give a bit more context, my JSON is something like:

{
  "rows" : {
    "type"      : "group[]",
    "label"     : "Rows",
    "itemLabel" : "{{index}}",
    "params"    : {
      "columns" : {
        "type"      : "group[]",
        "label"     : "Columns",
        "itemLabel" : "{{index}}. {{text}}",
        "params"    : {
          "text" : {
            "type"    : "text",
            "label"   : "Text",
            "initial" : "Lorem ipsum"
          }
        }
      }
    }
  }
}

Then I set a div as the looper provider with dynamic content {{dc:p:rows}}. And based on the looper documentation, I’m assuming that I can add another div inside it making it a consumer at the same time a looper provider with dynamic content set as {{dc:looper:item}} in order to loop through the columns fields and {{dc:looper:field key='text'}} in a text element. However, I am not seeing any results returned.

I guess my first question is if this is actually possible? If so, how should the loopers be structured? I checked the documentation for loopers can parameters and there seems to be no guide on how to set it up.

I saw a thread by @MathiasD which is related to my question here but it looks like his question was not answered even if he’s merely asking how should this be setup as it is not documented.

Please do not upsell me any of your customization service because I am not looking for some help having the customization done on my behalf.

Thank you.

Using your example I was able to double loop.

What you might be missing is the second looper using {{dc:looper:field key="columns"}} instead of {{dc:looper:item}}.

Using {{dc:looper:item type="json"}} might help you understand what you are currently looping through as well. It should just output {"text":"Lorem ipsum"} and not have any keys related to columns.

Let us know if this helps and have a great day.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.