murex Shell Docs

Command Reference: ja

A sophisticated yet simply way to build a JSON array

Description

murex has a pretty sophisticated builtin for generating JSON arrays. It works a little bit like Bash's {1..9} syntax but includes a few additional nifty features.

Usage

ja: [start..end] -> <stdout>
ja: [start..end.base] -> <stdout>
ja: [start..end,start..end] -> <stdout>
ja: [start..end][start..end] -> <stdout>

Examples

» ja: [1..5]
[
    "1",
    "2",
    "3",
    "4",
    "5"
]

» ja: [Monday..Sunday]
[
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday"
]

Please note that as per the first example, all arrays generated by ja are arrays of strings - even if you're command is ranging over integers.

Detail

Please read the documentation on a for a more detailed breakdown on of ja's supported features.

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon May 25 06:11:51 UTC 2020 against commit aa3f3b7aa3f3b7e471543754fdcaf910d4920cad9112b91. Downloadable murex binaries are also built weekly. Current version is 0.48.0120 BETA which has been verified against 29375 tests.