| Message ID | mailman.19995.1761765797.2093109.openwrt-devel@lists.openwrt.org |
|---|---|
| State | New |
| Headers | show |
| Series | [v2,1/3] jshn.sh: Send warnings to stderr | expand |
diff --git a/sh/jshn.sh b/sh/jshn.sh index 3f2f679187db96d77ccf27b15f5fc47cb8ee9796..e9c6a033981a1e877cf8de3a330b640e5094bf99 100644 --- a/sh/jshn.sh +++ b/sh/jshn.sh @@ -222,6 +222,7 @@ json_dump() { } json_get_type() { + # target=$2 local __dest="$1" local __cur @@ -291,11 +292,11 @@ json_select() { local type local cur - [ -z "$1" ] && { + [ -z "$target" ] && { _json_set_var JSON_CUR "J_V" return 0 } - [[ "$1" == ".." ]] && { + [[ "$target" == ".." ]] && { _json_get_var cur JSON_CUR _json_get_var cur "U_$cur" _json_set_var JSON_CUR "$cur" @@ -316,6 +317,8 @@ json_select() { } json_is_a() { + # target=$1 + # type=$2 local type json_get_type type "$1"