marqdo

08-recordsok

structure/08-records.mq.md

Structure

fn · h1main
comment

When the first header is @ or row, each data row is a map (marker column is not a field). Nested get: [field]([1](orders)).

bind `orders` = [{name: apple, qty: 2}, {name: pear, qty: 3}]
bind `n` = [name]([1](`orders`))
call> print text=`n`
bind `q` = [qty]([2](`orders`))
call> print text=`q`
Functions
Variables
  • n text
    apple
  • orders list · 2
    #nameqty
    1apple2
    2pear3
  • q int
    3

Execution

apple 3

Source

---
title: Row records
description: First header @ / row makes a list of maps
---

# main

When the first header is `@` or `row`, each data row is a map (marker column is not a field). Nested get: `[field]([1](orders))`.

`orders` =

| @ | name | qty |
|---|------|-----|
| 1 | apple | 2 |
| 2 | pear | 3 |

**`n` = [name]([1](orders))**

> print text=`n`

**`q` = [qty]([2](orders))**

> print text=`q`

Variable