jshn: in json_get_values(), handle json_select errors
[project/libubox.git] / sh / jshn.sh
index 176063f..70b7976 100644 (file)
@@ -209,7 +209,7 @@ json_get_values() {
 
        unset "$_v_dest"
        [ -n "$2" ] && {
-               json_select "$2"
+               json_select "$2" || return 1
                _select=1
        }