1
1
mirror of https://github.com/wader/fq.git synced 2024-12-26 15:02:28 +03:00
fq/doc/presentations/bts2022/jq2
2022-03-08 18:20:18 +01:00

21 lines
379 B
Plaintext

# Pipeline using pipe operator "|" and identity function "." for current input
> "hello" | length | . * 2
10
# Multiple outputs using output operator ","
> 1, 2 | . * 2
2
4
# Index array or object using .[key/index] or just .key for objects
> [1,2,3][1]
2
# Collect outputs into array using [...]
> [1,empty,2]
[1,2]
# Iterate array or object using .[]
> [[1,2,3][]]
[1,2,3]