Hi, I’m looking for a solution to dynamically convert a dictionary to a lis

Hi,
I’m looking for a solution to dynamically convert a dictionary to a list of dictionary with the items in the dictionary.

So for instance I have the following dictionary:
{employerId:9, advisorNumber:"AAA", id:33}

And I want to create a list with all the items in that dictionary. So basically the result should be the following:
{{employerId:9}, {advisorNumber:"AAA"},{id:33}}

This should be done dynamically since the items in the dictionary are not fixed.

Does anyone know a good solution or already build something simulair?

Thanks in advance!

OriginalPostID-188910

OriginalPostID-188910

  Discussion posts and replies are publicly visible

Parents
  • The apply function returns an array, so you can use the following where rule!returnSelf is a rule that returns the rule input (any type):
    {
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.employerId
              ),
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.advisorNumber
              ),
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.id
              )
    }
Reply
  • The apply function returns an array, so you can use the following where rule!returnSelf is a rule that returns the rule input (any type):
    {
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.employerId
              ),
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.advisorNumber
              ),
              fn!apply
              (
                        rule!returnSelf,
                        ri!data.id
              )
    }
Children
No Data