cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Mapping based on Value

aaron
New Contributor

Hi all!

Hoping someone could assist. My requirements is to map a specific email address from a list where type = "WORK". Example data:

{
"name": "xyz"
"country": "USA"
"emails": [ { "emailaddress": "x@gmail.com", "type": "WORK", }, { "emailaddress": "y@gmail.com", "type": "HOME", }, { "emailaddress": "z@gmail.com", "type": "PERSONAL", } ]
}

 the output of mapper should be:

{
"name"
: "xyz" "country": "USA" "emailaddress": "x@gmail.com" }

 I tried using ternary and a conditional snap but both didn't work so I probably got it wrong. 

thanks in advance!

0 REPLIES 0