JSONata Tutorials

Procuros · Internal training

Learn JSONata the way we map.

From your first field mapping to reviewing functions Atlas writes for you. Every exercise uses synthetic data, shows the expected output, explains why a run failed, and tests more than the happy path.

Your progress
  • Core · mapping fundamentals– / 10
  • Advanced · complex maps– / 4

Advanced unlocks after Core. Progress is saved in this browser.

How every lesson works

Three steps, same order every time

  1. 1
    Concept
    A short explanation with worked examples you can edit in the builder.
  2. 2
    Exercise
    Write the mapping with the expected output in view, then pass test runs for zero, one and many items and missing fields.
  3. 3
    Recap
    Takeaways, common mistakes and a checklist before you move on.

Track 1 · Lessons 0–9

Core — mapping fundamentals

  1. 0
    Transformations at Procuros
    Where transformations run as a document travels from sender to receiver: the two main maps, five optional positions, and which changes show in the Portal.
    Procuros-specific
  2. 1
    Intro to JSONata and the builder
    JSON input, expression, JSON output. Select, rename, calculate and omit fields, and get to know the input, expression and output panes.
  3. 2
    Data structures and the desired output
    Strings, numbers, booleans, objects, arrays, null. Missing vs null vs "" vs []. Start from the required output and its mandatory fields.
  4. 3
    Accessing fields and simple mapping
    Read nested input with full paths or by stepping into a block, and place the values into named output fields.
  5. 4
    When to hardcode
    Constants where the spec fixes a value for this map. Never to invent missing business data or fill mandatory fields with placeholders.
  6. 5
    Conditionals
    if, if/else and nested conditions. Combine and/or, match against a list with in, use fields as conditions, and handle optional fields deliberately.
  7. 6
    Mapping arrays
    A loop that collects results, array filters, indexes, singleton-array collapse, forcing an array and nested arrays. Test zero, one and many.
  8. 7
    Standard JSONata functions
    From string and number functions to composition, aggregation, array functions and $lookup. Input types and missing-value behaviour.
  9. 8
    Procuros custom functions
    Dates into and out of the canonical, safe variants for missing input, and numbering with counters. Timestamp units and timezone, and why you test them in Procuros.
    Procuros-specific
  10. 9
    Procuros mapping workflow and transformation UI
    Incoming format, source mapping, canonical document, destination mapping, outgoing format. Normalized EDIFACT keys, and fixing live maps after a complaint.
    Procuros-specific

Track 2 · Lessons 10–13

Advanced — reading and shaping complex maps

  1. 10
    Declaring variables
    Name reusable values, make maps readable, and keep an outer value when the evaluation context changes.
  2. 11
    Declaring and reading functions
    Parameters, return values and invocation, so you can read and review functions, including those Atlas writes.
  3. 12
    Non-main transformations
    Positions and what each one receives, the payloads/context input and the payloads output. Read the canonical from context after the destination mapping, and patch instead of rebuilding.
    Procuros-specific
  4. 13
    Using Atlas and AI for transformations
    Ask Atlas for a draft with the right context, then review, test and verify it in Procuros like any other mapping.
    Procuros-specific

A playground pass is not proof that a platform mapping works. Lessons 0, 8, 9, 12 and 13 cover what only Procuros can verify: custom functions, the canonical document, and the final outgoing format.