Is it somehow possible to create a map or dictionary using variables for the keys? For example, is there some way for me to do something like a!map(localvar1:local!var2) to make a user generated map? Or maybe use a foreach loop over a 2d array to convert it to a map?
Discussion posts and replies are publicly visible
AFAIK there isn't any way to define the key within a!map() dynamically like this. This sounds like a situation I would utilize the database to maintain dynamically defined key-value pairs, where the user can enter both and you can reference them where you need via a!queryEntity().
What is the use case?
I was wanting to use a!setGroupAttributes to make an interface that sets attributes on groups. The function requires a dictionary of attributes to set them and ideally I'd like the interface to allow one to set both the attribute names and values.