0
votes

Here is the input payload from where I have to map the following item

{
    "externalOrderLineRefs": [
        {
            "sourceSystem": "Shutterfly",
            "identifier": "SFLYOrderLine09876"
        }
    ],
    "externalQuoteLineRefs": [
        {
            "sourceSystem": "Salesforce",
            "identifier": "SFDCQuoteLine123"
        },
        {
            "sourceSystem": "Shutterfly",
            "identifier": "SFLYQuote123456"
        }
    ]
}

The mapping condition: Quote = externalQuoteLineRefs.identifier WHERE sourceSystem = "Shutterfly"

1

1 Answers

3
votes

Will this do the trick? Otherwise exact output would be very beneficial.

%dw 1.0
%output application/json
---
payload.externalQuoteLineRefs filter $.sourceSystem == "Shutterfly" map {
    quote: $.identifier
}

Output:

[
  {
    "quote": "SFLYQuote123456"
  }
]