Bundle to comma separated text

Hi dear community,

I have a bundle that I want to convert to comma separated text.

            "25": {
                "25.1": "Workshop number 1",
                "25.3": "Workshop number 2",
                "25.2": "",
                "25.4": "",
                "25.5": "",
                "25.6": "",
                "25.7": "Workshop number 7",
                "25.8": "",
                "25.9": "",
                "25.11": "",
                "25.12": ""
            }

Workshop number 1, Workshop number 2, Workshop number 7

Some challenges:

  • We don’t want empty values, so no Workshop number 1, Workshop number 2, , , , , Workshop number 7, , , , ,
  • The number of values inside the bundle can change. Right now we have 12 options but in the future we might have more. Ideally we don’t want to have to update the scenario when this happens. So basically we want everything that’s in bundle 25 no matter how long it is.

I am really stuck with this, tried many formulas, iterators, parsers and what not and I am totally lost. Any help is greatly appreciated.

1 Like

Okay so I tried ChatGPT, Claude and Gemini, spent a lot of time prompting and whatever solution it gave me - using modules and/or formulas - it never worked.

Now with AI Studio it gave me two formulas that didn’t work and I was about to give up, when suddenly it gave me the magical formula.

Here we go:
{{join(split(join(map(toArray(36.answers.25); "value"); ","); /,+/); ", ")}}

2 Likes

Hey there,

here:

{{join(remove(map(toArray(1.`25`); "value"); emptystring); ", ")}}