How to create a key-value object/collection, and add to an associative array containing key-value pairs

No problem, glad I could help!

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:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

2 Likes