marqdo

07-mapok

structure/07-map.mq.md

Structure

fn · h1main
comment

A multi-column table with one data row is a map. Read values with [key](map).

bind `kinds` = {apple: fruit, cucumber: vegetable}
bind `k` = [apple](`kinds`)
call> print text=`k`
bind `k` = [cucumber](`kinds`)
call> print text=`k`
Functions
Variables
  • k text
    vegetable
  • kinds map · 2
    applefruit
    cucumbervegetable

Execution

fruit vegetable

Source

---
title: Maps (horizontal tables)
description: Multi-column tables are maps; link-index get
---

# main

A multi-column table with one data row is a map. Read values with `[key](map)`.

`kinds` =

| apple | cucumber |
|-------|----------|
| fruit | vegetable |

**`k` = [apple](kinds)**

> print text=`k`

**`k` = [cucumber](kinds)**

> print text=`k`

Variable