looping through a dictionary

Certified Senior Developer

I've got a dictionary of values and I would like to either loop through it for a grid, or convert it to something I can loop through. How might I do that? 

For example, I've got this dictionary:

{A: 3.1, B: 2.2, C: 1.3}

I'd like to have a table that is something like Name for the first column containing A, B, C and Value for the second column with the various numbers in there. I'd like to also record a similar in thing in the database. How can I do that? 

  Discussion posts and replies are publicly visible

Parents Reply
  • That's... silly...
    I don't quite understand how to output a dictionary after that. Is there a way to build a dictionary or map?
    I can loop over the keys with forEach, but the output is always an array. I'd like to iterate over a dictionary or map to transform it into a new map but I can't seem to see how to add keys to an existing map, or mutate the value of an existing key. Are dictionaries and maps just immutable? It doesn't say that clearly anywhere in the documentation.
    I have a large dictionary and I want to find a few keys and change them slightly without re-declaring the whole dictionary in an expression. Is this possible? I've opened a discussion here (https://community.appian.com/discussions/f/data/26960/mutate-a-dictionary-or-map) but I posted another discussion question about something else a month ago and nobody has replied so the community here doesn't look very active to me. I was shocked and happy that you replied here.

No Data