Hi guys. Begginer here
Looked for similar questions but couldn’t find one that suits my case. I’ve been struggling to map data in a certain way.
This is an excerpt of a bigger escenario, the final modules.
I’m getting info from different sources and joining them in an "aggregato to JSON module with certain data structure. The data maps correctly, but:
One of the modules gives me a list of data which is a string separated by commas, and I need it to be displayed as an array, in which each number is an independent ítem, Like this exercise:
This might be simple to do using split(), but when I use that funcion around my map(), data doesn´t get to the last module, and I can’t figure out how to make it work.
It might have something to do with the type of data to use. I tried setting that list as an array, but mapping items by item is not working for me, and every other combination data-type vs inline function has failed to render the info as I need it
I exported the blueprint, which I leave below, just in case somebody can have a look. Any ideas?
I would point out that I would prefer an “inline function -solution”. There might be an iterate in a module and do x- way to do it (which is welcome, anyway). But, as I need to save operations, inline rocks. Thanks in advance !!
blueprint.json (17.1 KB)
Welcome to the Make community!
Please provide the output bundles as shown in your screenshot as well.
Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
A.
Save the bundle contents in your text editor as a bundle.txt
file, and upload it here into this discussion thread.
Uploading it here will look like this:
bundle.txt (12.3 KB)
B.
If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:
-
Either add three backticks ```
before and after the code, like this:
```
input/output bundle content goes here
```
-
Or use the format code button in the editor:
Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.
Following these steps will allow others to assist you here. Thanks!
samliew – request private consultation
Join the unofficial Make Discord server to chat with us!
1 Like
Looks like you need to use the “first” function, before you can split the text:
This is because map returns an array, and you want to get the first array item (string) to split it.
2 Likes
Thanks a lot @samliew.
The solution was so simple that is a bit embarrasing
I’ll go deeper into functions and this kind of logic issues.
Cheers!
2 Likes