Forum Discussion

shreegeet's avatar
shreegeet
New Contributor II
4 years ago

Swap keys and values

Hi,

I have a use case of lookup function where I have to use the same expression library but the lookup will happen both on the basis of key and value pair.
Below is the expression library that I have uploaded
{
“Lookup”: {
“Key1”: “Value1”,
“Key2”: “Value2”,
“Key3”: “Value3”,
“Key4”:“Value4”
}
}
Now I will get value1 from previous snaps, I want to use value1 to retrieve data as Key1.

Can you suggest how this can be achieved?

Regards,
Shreegeet

2 Replies

  • smudassir's avatar
    smudassir
    Employee

    Just try on the data you had earlier.

    • darshthakkar's avatar
      darshthakkar
      Valued Contributor

      Sure, will keep you posted after trying that solution. Thank you.