I have a question and hope it’s not a duplicate, but have been looking for an answer for days (and over the months, multiple times) and have not come across one yet.
In some cases, I am running a javascript (on 0codekit, 1001fx, customjs.space, etc) as simple as this one:
What I would like to end up with, is a result that contains different items, so that I can select each separately:
Example:
I’ve tested with various javascript notations (and also some other Make modules) to output Arrays or Objects but I can’t seem to split the collection up into useable bits.
Can anyone tell me how I can do this? I just need a simple key/value result, preferably in pure javascript (so that I don’t have to add multiple transformers after a script output).
If your variable is an array you can also manually reference it the same way.
{{2.countries}}
Then to map items in an array, see Mapping with arrays below. I also strongly suggest doing the Make Academy first.
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —