Forum Discussion

Gitanjali's avatar
Gitanjali
New Contributor II
2 years ago

Transform list of objects into single object with key value pairs.

Trying to use snaplogic expressions to read input view of below form from union snap:

[

 {

   "a": " value1"

  }, 

  {

    "b": "value2"

  }

]

into http client snap such that I can fetch value as: value1 for a and value2 for b. 

What can be done to achieve this? 

I tried expression: $.get('a') but it iterates over input view two times and returns null once and value1 other time. The order of objecta can vary in input view