From ba08698042351206ce2a54a334447f4fa8262112 Mon Sep 17 00:00:00 2001 From: kake26 Date: Thu, 24 Oct 2024 22:40:21 -0500 Subject: [PATCH] Added fix for read jason and keys containing control characters --- config_json.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_json.bash b/config_json.bash index 3ecf1b5..8d2b713 100755 --- a/config_json.bash +++ b/config_json.bash @@ -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