#!/bin/bash setglobal json = $[= ${arg:5} ' || do { setglobal json = 'null'; break; } setglobal json = $(array[${arg:5}]) } } print $json; echo