This commit is contained in:
Alexandre
2022-01-17 13:36:26 +01:00
parent 0205346557
commit 6a7e1fe28d
3 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ if [ -f ${JSONTOCHECK} ]; then
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
# Check if all keys are still there, or add them
for KEYS in ${arr[@]}; do
for KEYS in "${arr[@]}"; do
# Check if key exists
KEYSTHERE=$(jq "has(\"${KEYS}\")" ${JSONTOCHECK})
if [ $KEYSTHERE != "true" ]; then