jshn.sh: add json_get_vars() wrapper function
This commit is contained in:
parent
f8d3e57b45
commit
97ed91fa77
1 changed files with 7 additions and 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
|
||||
|
|
Loading…
Reference in a new issue