Convert "Result" into separate fields

Hi all! :wave:

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:

However, the output of my script ends up in a single collection called “Result” with no useable / selectable items.

Example:

What I would like to end up with, is a result that contains different items, so that I can select each separately:

Example:
Screen Shot 2024-06-28 at 14.14.19

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).

Thanks and best regards in advance.

Welcome to the Make community!

You might need to run the module once so that it knows output and can use it as sample data structure.

Otherwise you can also manually type in

{{2.result.price}}

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

1 Like

That’s very cool, I didn’t know that was possible.
Thanks a lot!

Is there no way (from a javascript notation perspective) that I can make this appear as a separate field in the result?
Best regards!

Do you mean an array?

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 —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

2 Likes