iterate over a map key

Certified Lead Developer

Hi Champs,

I have a map value having multiple key and value pair. Now I want to check for a value which exists in one or more key. So I guess the only way to do that is to iterate over the keys in the map. 

How can I achieve the same. As of my knowledge, for each works for no of map not for no of key/value pair in a map.

Regards,

Ghanashyam

  Discussion posts and replies are publicly visible

Parents
  • If you always have the same keys...

    local!key1: index(local!map, "key1"),
    local!key2: index(local!map, "key2"),
    local!key3: index(local!map, "key3"),

    local!int1: union(intersection(local!key1, local!key2),intersection(local!key1, local!key2)),
    local!int2: union(intersection(local!key1, local!key3),intersection(local!key1, local!key3)),
    local!int3: union(intersection(local!key2, local!key3),intersection(local!key2, local!key3)),

    local!int1 & "//" & local!int2 & "//" & local!int3

Reply
  • If you always have the same keys...

    local!key1: index(local!map, "key1"),
    local!key2: index(local!map, "key2"),
    local!key3: index(local!map, "key3"),

    local!int1: union(intersection(local!key1, local!key2),intersection(local!key1, local!key2)),
    local!int2: union(intersection(local!key1, local!key3),intersection(local!key1, local!key3)),
    local!int3: union(intersection(local!key2, local!key3),intersection(local!key2, local!key3)),

    local!int1 & "//" & local!int2 & "//" & local!int3

Children
No Data