diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-05-14 02:21:12 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-05-14 02:21:12 +0400 |
commit | 97ed91fa77e3e2926bab3e70955a0e2b511db86e (patch) | |
tree | 285feaaa03fae15956b04e5a0b40ea43e92c1ff8 /sh/jshn.sh | |
parent | f8d3e57b45170a612fc4209d86ffbd410994ccac (diff) |
jshn.sh: add json_get_vars() wrapper function
Diffstat (limited to 'sh/jshn.sh')
-rw-r--r-- | sh/jshn.sh | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -104,6 +104,13 @@ json_get_var() { eval "export -- \"$dest=\${${JSON_CUR}_$var}\"" } +json_get_vars() { + while [ "$#" -gt 0 ]; do + local _var="$1"; shift + json_get_var "$_var" "$_var" + done +} + json_select() { local target="$1" local type |