rulemorph 0.2.3

YAML-based declarative data transformation engine for CSV/JSON to JSON
Documentation
version: 1
input:
  format: json
  json: {}
mappings:
  - target: "items"
    source: "items"
  - target: "first_id"
    source: "input.items[0].id"
  - target: "second_name"
    source: "input.items[1].name"
  - target: "flag0"
    source: "input.meta.flags[0]"
  - target: "flag0_default"
    source: "input.meta.flags[0]"
    default: false
  - target: "third_id_default"
    source: "input.items[2].id"
    default: "none"
  - target: "first_item_name"
    expr: { ref: "out.items[0].name" }
  - target: "matrix_value"
    source: "context.matrix[1][0]"