JSON Array without child Dictionary

I’m trying to replicate the following data structure but can’t figure out a way to achieve this, any help would be much appreciated:

“payload”: {
“id”: “1”,
“modalStack”: [],
“pageStack”: [
“page1”,
“page2”
]
}
or
“payload”: {
“id”: “1”,
“modalStack”: [
“modal1”,
“modal2”
]
“pageStack”: [],
}

Obviously checked out JSON Array type, but I don’t see how to just have a list of elements in the array. Rather than have an array of dictionaries.

You can get an array of strings by simply giving any field a name with brackets. For example: modalStack[1-3] will generate an array with between 1 and 3 items inclusive. You’ll probably want to use custom list for the field type.

Thanks for the quick response. I did totally miss that one. Apologies for that. I got that working however it would be good to control the number of elements from formula.

Schema is for example:
payload.id > custom list [getHelp,getHelp_campuses,getHelp_phone,getHelp_callBack]
payload.pageStack[1] > formula if field(‘payload.id’) == ‘getHelp_campuses’ then ‘getHelp’ elsif field(‘payload.id’) == ‘getHelp_phone’ then ‘getHelp’ elsif field(‘payload.id’) == ‘getHelp_callBack’ then ‘getHelp’ else nil end

This works fine if the array is a single element, however, there are two issues with this approach:

  1. field(‘payload.id’) == ‘getHelp_callBack’ then ‘getHelp’ should actually have two elements in the array e.g.
    “pageStack”: [
    ‘getHelp_phone’,
    ‘getHelp’
    ]
  2. else nil outputs
    “pageStack”: [
    null
    ]
    Event though “include null values” is unchecked.

Could you please point me in the right direction here?