Stedi

Mappings: support for functions when setting List ContextNovember 30, 2021


In many mapping scenarios, a source document might contain one or more JSON arrays. In order to map an array like that to a different array on the target document, you need to specify a list context (see Mapping Loops).

Previously, you could only loop over all items on the source array and map each item, but it was not possible to change the order of the array elements or exclude certain array items from the result.

Today, we are adding support for JSONata functions usage when setting a List Context. With the support from $filter$sort$reverse, and other functions you should be able to translate an array of any shape to the desired format.

For example, assuming that the orders below are coming in a random sorting order, you can adjust that order and sort the result by orderDate before mapping them to shipments:

Stedi

Build EDI integrations fast, without being an EDI expert

Start building
About
How Stedi worksCustomersPricingDocumentationChangelog
Follow
  1. Twitter
  2. GitHub
Backed by
AdditionBloomberg BetaFirst RoundStripeUSV
Customer AgreementService TermsPrivacy Notice

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on our site are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.