What are you trying to achieve?
I am trying to extract a value from an array with the desired output of “1718290069725” using the map function. I want to set it as a variable so it can be used in future steps, but I just cannot make it work. Please can someone help?
The item is inside an array and collection 2. This is the mapping function I’ve tried to create:
{{map(1.payload.custom_fields; “id”; “date_created”; 1718290069725)}}
I’ve attached a copy of the JSON and screenshots of the mapping variable I am trying to create.
To confirm I am trying to capture 1718290069725 and set it as a variable so that I can use it in future steps.
Really appreciate your help! Thank you.
Steps taken so far
I have already been through Make tutorial and other tutorials here in the forum without success! Have tried various attempts but it’s always coming back empty or with a different variable.
Screenshots: scenario setup, module configuration, errors
Welcome to the Make community!
The date_created value of 1718290069725 would change everytime the scenario runs with different data, so you can’t map the date.
For your current mapping,
{{map(1.payload.custom_fields; “id”; “date_created”; 1718290069725)}}
This means: Get the id where date_created is equal to exactly 1718290069725
Perhaps you want to map the name instead?
{{map(1.payload.custom_fields; “date_created”; “name”; "ChatGPT Request")}}
Then, the result will be an array. To get the value from the array, you can use the built-in function first
.
For more information, see Mapping with arrays link below
Links
Here are some useful links and guides to help you get started and learn more on how to use the Make platform, apps, and app modules —
General
Help Center Basics
Articles & Videos
samliew – request private consultation
Join the unofficial Make Discord server to chat with us!
2 Likes