jshn.sh: add json_get_vars() wrapper function

This commit is contained in:
Felix Fietkau 2012-05-14 00:21:12 +02:00
parent f8d3e57b45
commit 97ed91fa77

View file

@ -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