Hi,
I have a scenario where the input from a database is a code based on A B C D. It can be different combinations of this code, with a minimum of 2 letters but the maximum can be more than 4 because some codes include different letters but bare no relevance to the scenario. Therefore I use a “contains” filter to make sure that only codes that have a minimum of 2 letters (of which 2 should be from A B C D) are passed through.
However, in the next step I need to form an array of values tied to each different letter (Discord API call to bulk delete messages). My database contains the message ID tied to each letter of my code, however if said letter doesn’t exist it doesn’t have a message ID and thus shouldn’t be included in the array.
So what I need is the following:
A way to create an JSON array “messages”: [“123”,“123”,“etc”] based on the output of the filter. If the code contains B C it should only include those values. I tried making this happen with an IF() statement but it’s impossible to include the “,” because the last value shouldn’t have it.
So at this point it should only take the second and fourth value and create an array with that, that I can use in a Discord API call.
But when I select the array from the array aggregrator it gives me an error like this:
It should instead look like
"messages":["10293929302","10238293829"]
(couldn’t copy, but the numbers starting with 10 from the array above)
I’d be happy to elaborate further on the issue.