I have list of map want to convert it into single map

i have this {a!map(memberId: "test ui "), a!map(holdReason: "test ui "), a!map(description: "test ui "), a!map(summary: "test ui ")} wants an out put like 


a!map(

memberId: "test ui ",

holdReason: "test ui ",

description: "test ui ",

summary: "test ui "

)

is this possible ??

  Discussion posts and replies are publicly visible

Parents
  • a!localVariables(
    local!listOfMap: {
    a!map(memberId: "test ui "),
    a!map(holdReason: "test ui "),
    a!map(description: "test ui "),
    a!map(summary: "test ui ")
    },
    local!keyValuePair: a!forEach(
    items: local!listOfMap,
    expression: {
    key: tostring(a!keys(fv!item)),
    value: index(
    fv!item,
    tostring(a!keys(fv!item)),
    null()
    )
    }
    ),
    a!update(
    a!map(),
    cast(
    a!listType('type!Text'),
    index(local!keyValuePair, "key", null())
    ),
    cast(
    a!listType('type!Text'),
    index(local!keyValuePair, "value", null())
    )
    )
    )

Reply
  • a!localVariables(
    local!listOfMap: {
    a!map(memberId: "test ui "),
    a!map(holdReason: "test ui "),
    a!map(description: "test ui "),
    a!map(summary: "test ui ")
    },
    local!keyValuePair: a!forEach(
    items: local!listOfMap,
    expression: {
    key: tostring(a!keys(fv!item)),
    value: index(
    fv!item,
    tostring(a!keys(fv!item)),
    null()
    )
    }
    ),
    a!update(
    a!map(),
    cast(
    a!listType('type!Text'),
    index(local!keyValuePair, "key", null())
    ),
    cast(
    a!listType('type!Text'),
    index(local!keyValuePair, "value", null())
    )
    )
    )

Children