Added fix for read jason and keys containing control characters
This commit is contained in:
parent
89f514ce60
commit
ba08698042
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ read_json() {
|
|||
local SECTION="$2"
|
||||
local KEY="$3"
|
||||
|
||||
jq -r ".${SECTION}.${KEY}" "$JSON_FILE"
|
||||
jq -r ".${SECTION}[\"${KEY}\"]" "$JSON_FILE"
|
||||
}
|
||||
|
||||
# Function to write a value to a JSON configuration file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue