You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ShellBot.sh
+38-21Lines changed: 38 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -128,11 +128,15 @@ declare _VAR_INIT_
128
128
129
129
Json() { local obj=$(jq -Mc "$1"<<<"${*:2}"); obj=${obj#\"};echo"${obj%\"}"; }
130
130
131
-
GetAllValues(){
131
+
SetDelmValues(){
132
132
local obj=$(jq "[..|select(type == \"string\" or type == \"number\" or type == \"boolean\")|tostring]|join(\"${_BOT_DELM_/\"/\\\"}\")"<<<$*)
133
133
obj=${obj#\"};echo"${obj%\"}"
134
134
}
135
135
136
+
GetAllValues(){
137
+
jq '[..|select(type == "string" or type == "number" or type == "boolean")|tostring]|.[]'<<<$*
138
+
}
139
+
136
140
GetAllKeys(){
137
141
jq -r 'path(..|select(type == "string" or type == "number" or type == "boolean"))|map(if type == "number" then .|tostring|"["+.+"]" else . end)|join(".")|gsub("\\.\\[";"[")'<<<$*
0 commit comments