}
json_cleanup() {
- local unset
+ local unset tmp
_json_get_var unset JSON_UNSET
for tmp in $unset JSON_VAR; do
json_get_values() {
local _v_dest="$1"
local _v_keys _v_val _select=
+ local _json_no_warning=1
unset "$_v_dest"
[ -n "$2" ] && {
_json_set_var JSON_CUR "$cur"
;;
*)
- echo "WARNING: Variable '$target' does not exist or is not an array/object"
+ [ -n "$_json_no_warning" ] || \
+ echo "WARNING: Variable '$target' does not exist or is not an array/object"
return 1
;;
esac