Hi! I want to add new values to the dictionary and haven't found a method that can help me.
var first = Dictionary('field1', 1, 'field2', 2)
If I want to add new key/value in the Dictionary, what can I use?
By assigning a value to a key, Arcade will overwrite an existing value or create a new key if it doesn't already exist.
var f = Dictionary('field1', 1, 'field2', 2) // add new key/value pair f['field3'] = 'hey' // overwrite existing value f['field1'] = 'overwrite!' return f
PS - I'm assuming that's just a made-up sample, but don't use existing function names like first as variable names, it's just asking for trouble!
Thank you Josh Carlson! This is the example I was looking for.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.