Skip to content

Structure keywords

Structure keywords hold pairings. They descend: descendant pairings evaluate against a fresh target, and the finished result writes back at the pairing’s target pointer.

Core. An ordered map of pairings. Order is semantics: pairings run sequentially, and later pairings can read earlier writes.

/person/name: /n

is shorthand for a top-level mapping. Nested, it builds structure:

/out:
source: /data
mapping:
/name: /n

Core. The same as mapping, applied over an array: one fresh target per element, elements evaluated in parallel. Pointers inside each read from the element.

/out:
source: /items
each:
/v: /n
{ "items": [{ "n": 1 }, { "n": 2 }] }

produces { "out": [{ "v": 1 }, { "v": 2 }] }.

Pairing order is still meaningful inside each element. Cross-element order is not: elements map independently. Every element maps, falsy ones included: 0, "", false, and null each evaluate in their own position.