I want create a string that lists all the values in attribute time from each array. I have tried all day to figure this out but I am stuck. If anyone knows how I can access the time attribute via default tools in make I would be very greatful
Hi @Callum
If you could share a sample output bundle and share how you need the output look like, We could further assist you
Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation
it is in this format
{βslotsβ: {β2025-04-25β: [{βtimeβ: β2025-04-25T11:00:00+01:00β}, {βtimeβ: β2025-04-25T13:00:00+01:00β}, {βtimeβ: β2025-04-25T14:00:00+01:00β}, {βtimeβ: β2025-04-25T15:00:00+01:00β}, {βtimeβ: β2025-04-25T15:30:00+01:00β}], β2025-04-28β: [{βtimeβ: β2025-04-28T09:30:00+01:00β}, {βtimeβ: β2025-04-28T10:00:00+01:00β}, {βtimeβ: β2025-04-28T10:30:00+01:00β}, {βtimeβ: β2025-04-28T13:00:00+01:00β}, {βtimeβ: β2025-04-28T14:00:00+01:00β}, {βtimeβ: β2025-04-28T14:30:00+01:00β}], β2025-04-29β: [{βtimeβ: β2025-04-29T09:00:00+01:00β}, {βtimeβ: β2025-04-29T09:30:00+01:00β}, {βtimeβ: β2025-04-29T10:00:00+01:00β}, {βtimeβ: β2025-04-29T10:30:00+01:00β}, {βtimeβ: β2025-04-29T13:00:00+01:00β}, {βtimeβ: β2025-04-29T13:30:00+01:00β}, {βtimeβ: β2025-04-29T14:00:00+01:00β}, {βtimeβ: β2025-04-29T14:30:00+01:00β}, {βtimeβ: β2025-04-29T15:30:00+01:00β}], β2025-04-30β: [{βtimeβ: β2025-04-30T10:00:00+01:00β}, {βtimeβ: β2025-04-30T10:30:00+01:00β}, {βtimeβ: β2025-04-30T11:00:00+01:00β}, {βtimeβ: β2025-04-30T13:00:00+01:00β}, {βtimeβ: β2025-04-30T13:30:00+01:00β}, {βtimeβ: β2025-04-30T14:00:00+01:00β}, {βtimeβ: β2025-04-30T14:30:00+01:00β}], β2025-05-01β: [{βtimeβ: β2025-05-01T09:00:00+01:00β}, {βtimeβ: β2025-05-01T09:30:00+01:00β}, {βtimeβ: β2025-05-01T11:00:00+01:00β}, {βtimeβ: β2025-05-01T13:00:00+01:00β}, {βtimeβ: β2025-05-01T14:00:00+01:00β}, {βtimeβ: β2025-05-01T14:30:00+01:00β}, {βtimeβ: β2025-05-01T15:30:00+01:00β}], β2025-05-05β: [{βtimeβ: β2025-05-05T09:00:00+01:00β}, {βtimeβ: β2025-05-05T09:30:00+01:00β}, {βtimeβ: β2025-05-05T10:00:00+01:00β}, {βtimeβ: β2025-05-05T10:30:00+01:00β}, {βtimeβ: β2025-05-05T13:00:00+01:00β}, {βtimeβ: β2025-05-05T14:00:00+01:00β}, {βtimeβ: β2025-05-05T14:30:00+01:00β}, {βtimeβ: β2025-05-05T15:00:00+01:00β}, {βtimeβ: β2025-05-05T15:30:00+01:00β}], β2025-05-06β: [{βtimeβ: β2025-05-06T09:00:00+01:00β}, {βtimeβ: β2025-05-06T09:30:00+01:00β}, {βtimeβ: β2025-05-06T10:00:00+01:00β}, {βtimeβ: β2025-05-06T10:30:00+01:00β}, {βtimeβ: β2025-05-06T13:00:00+01:00β}, {βtimeβ: β2025-05-06T13:30:00+01:00β}, {βtimeβ: β2025-05-06T14:00:00+01:00β}, {βtimeβ: β2025-05-06T14:30:00+01:00β}, {βtimeβ: β2025-05-06T15:00:00+01:00β}, {βtimeβ: β2025-05-06T15:30:00+01:00β}], β2025-05-07β: [{βtimeβ: β2025-05-07T13:00:00+01:00β}, {βtimeβ: β2025-05-07T13:30:00+01:00β}, {βtimeβ: β2025-05-07T14:00:00+01:00β}, {βtimeβ: β2025-05-07T14:30:00+01:00β}, {βtimeβ: β2025-05-07T15:00:00+01:00β}, {βtimeβ: β2025-05-07T15:30:00+01:00β}], β2025-05-08β: [{βtimeβ: β2025-05-08T09:00:00+01:00β}, {βtimeβ: β2025-05-08T09:30:00+01:00β}]}}
I would like to get this output or something similar
Welcome to the Make community!
Yes, that is possible. Youβll need a minimum of one module with these built-in functions:
e.g.: (paste this into the field)
{{join(map(flatten(map(toArray(35.array); "value")); "time"); newline)}}
Output:
This is just an example. Your final solution may or may not look like this depending on your requirements.
Module Export - quick import into your scenario
You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.
-
Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.
-
Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.
JSON module export β paste this directly in your scenario
{"subflows":[{"flow":[{"id":350,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"{\"slots\": {\"2025-04-25\": [{\"time\": \"2025-04-25T11:00:00+01:00\"}, {\"time\": \"2025-04-25T13:00:00+01:00\"}, {\"time\": \"2025-04-25T14:00:00+01:00\"}, {\"time\": \"2025-04-25T15:00:00+01:00\"}, {\"time\": \"2025-04-25T15:30:00+01:00\"}], \"2025-04-28\": [{\"time\": \"2025-04-28T09:30:00+01:00\"}, {\"time\": \"2025-04-28T10:00:00+01:00\"}, {\"time\": \"2025-04-28T10:30:00+01:00\"}, {\"time\": \"2025-04-28T13:00:00+01:00\"}, {\"time\": \"2025-04-28T14:00:00+01:00\"}, {\"time\": \"2025-04-28T14:30:00+01:00\"}], \"2025-04-29\": [{\"time\": \"2025-04-29T09:00:00+01:00\"}, {\"time\": \"2025-04-29T09:30:00+01:00\"}, {\"time\": \"2025-04-29T10:00:00+01:00\"}, {\"time\": \"2025-04-29T10:30:00+01:00\"}, {\"time\": \"2025-04-29T13:00:00+01:00\"}, {\"time\": \"2025-04-29T13:30:00+01:00\"}, {\"time\": \"2025-04-29T14:00:00+01:00\"}, {\"time\": \"2025-04-29T14:30:00+01:00\"}, {\"time\": \"2025-04-29T15:30:00+01:00\"}], \"2025-04-30\": [{\"time\": \"2025-04-30T10:00:00+01:00\"}, {\"time\": \"2025-04-30T10:30:00+01:00\"}, {\"time\": \"2025-04-30T11:00:00+01:00\"}, {\"time\": \"2025-04-30T13:00:00+01:00\"}, {\"time\": \"2025-04-30T13:30:00+01:00\"}, {\"time\": \"2025-04-30T14:00:00+01:00\"}, {\"time\": \"2025-04-30T14:30:00+01:00\"}], \"2025-05-01\": [{\"time\": \"2025-05-01T09:00:00+01:00\"}, {\"time\": \"2025-05-01T09:30:00+01:00\"}, {\"time\": \"2025-05-01T11:00:00+01:00\"}, {\"time\": \"2025-05-01T13:00:00+01:00\"}, {\"time\": \"2025-05-01T14:00:00+01:00\"}, {\"time\": \"2025-05-01T14:30:00+01:00\"}, {\"time\": \"2025-05-01T15:30:00+01:00\"}], \"2025-05-05\": [{\"time\": \"2025-05-05T09:00:00+01:00\"}, {\"time\": \"2025-05-05T09:30:00+01:00\"}, {\"time\": \"2025-05-05T10:00:00+01:00\"}, {\"time\": \"2025-05-05T10:30:00+01:00\"}, {\"time\": \"2025-05-05T13:00:00+01:00\"}, {\"time\": \"2025-05-05T14:00:00+01:00\"}, {\"time\": \"2025-05-05T14:30:00+01:00\"}, {\"time\": \"2025-05-05T15:00:00+01:00\"}, {\"time\": \"2025-05-05T15:30:00+01:00\"}], \"2025-05-06\": [{\"time\": \"2025-05-06T09:00:00+01:00\"}, {\"time\": \"2025-05-06T09:30:00+01:00\"}, {\"time\": \"2025-05-06T10:00:00+01:00\"}, {\"time\": \"2025-05-06T10:30:00+01:00\"}, {\"time\": \"2025-05-06T13:00:00+01:00\"}, {\"time\": \"2025-05-06T13:30:00+01:00\"}, {\"time\": \"2025-05-06T14:00:00+01:00\"}, {\"time\": \"2025-05-06T14:30:00+01:00\"}, {\"time\": \"2025-05-06T15:00:00+01:00\"}, {\"time\": \"2025-05-06T15:30:00+01:00\"}], \"2025-05-07\": [{\"time\": \"2025-05-07T13:00:00+01:00\"}, {\"time\": \"2025-05-07T13:30:00+01:00\"}, {\"time\": \"2025-05-07T14:00:00+01:00\"}, {\"time\": \"2025-05-07T14:30:00+01:00\"}, {\"time\": \"2025-05-07T15:00:00+01:00\"}, {\"time\": \"2025-05-07T15:30:00+01:00\"}], \"2025-05-08\": [{\"time\": \"2025-05-08T09:00:00+01:00\"}, {\"time\": \"2025-05-08T09:30:00+01:00\"}]}}"},"metadata":{"designer":{"x":1101,"y":-3158},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":352,"module":"util:SetVariable2","version":1,"parameters":{},"mapper":{"name":"output","scope":"roundtrip","value":"{{join(map(flatten(map(toArray(350.slots); \"value\")); \"time\"); newline)}}"},"metadata":{"designer":{"x":1401,"y":-3158}}}]}],"metadata":{"version":1}}
Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?
Hope this helps! Let me know if there are any further questions or issues.
β @samliew
This makes sense, thank you so much!
No problem, glad I could help!