Skip to content

Commit

Permalink
jshn.sh: Minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
  • Loading branch information
pprindeville committed Aug 4, 2024
1 parent da01288 commit d1f6263
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sh/jshn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ json_dump() {
}

json_get_type() {
# target=$2
local __dest="$1"
local __cur

Expand Down Expand Up @@ -338,11 +339,11 @@ json_select() {
local type
local cur

[ -z "$1" ] && {
[ -z "$target" ] && {
_json_set_var JSON_CUR "J_V"
return 0
}
[[ "$1" == ".." ]] && {
[[ "$target" == ".." ]] && {
_json_get_var cur JSON_CUR
_json_get_var cur "U_$cur"
_json_set_var JSON_CUR "$cur"
Expand All @@ -363,6 +364,8 @@ json_select() {
}

json_is_a() {
# target=$1
# type=$2
local type

json_get_type type "$1"
Expand Down

0 comments on commit d1f6263

Please sign in to comment.