cancel
Showing results for 
Search instead for 
Did you mean: 

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

Gitanjali
New Contributor II

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

1 REPLY 1

svatada
Former Employee

@Gitanjali You can achieve your usecase using GroupByN/GroupByFields snap. Check below example.