Hi,
With Make I can create an associative array based on a collection.
Also I can add to a “normal” array via the “add()” function.
But could not find in the documentation how to add a “key => value” entry to an associative array.
Is it possible, can you help me with that? Thank you.
I use the Parse JSON module in the JSON app to create a more complex data structure. This gives you complete control of the array, key/value structure. Then when it executes it will parse the JSON and create an array with the key value pairs you want. If you create multiple structues under the top array then those wil be generated as output bundles.
You can aggregate these outputs into one array using an array aggregator and get the structure you want then.
Quick tip: Did you know, you can convert a collection to key-value pairs using the built-in function toArray? The inverse of that is toCollection! These two advanced functions are not commonly known and you might find yourself using them especially if you are adding/modifying KVPs.
1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
others can save time when catching up with the latest activity here, and
allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!