Added fix for read jason and keys containing control characters

This commit is contained in:
kake26 2024-10-24 22:40:21 -05:00
parent 89f514ce60
commit ba08698042
Signed by: kake26
GPG key ID: E8AFC43591876B4D

View file

@ -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