Skip to content

Commit

Permalink
fix: merge-json doesn't merge properly
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Bieren <[email protected]>
  • Loading branch information
johnbieren committed Oct 13, 2023
1 parent 68d2bd0 commit e1d2258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/merge-json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if ! echo "$json2" | jq -e . >/dev/null 2>&1; then
fi

# Merge the JSON objects
merged_json=$(printf '%s\n%s' "$json1" "$json2" | jq -cs add)
merged_json=$(printf '%s\n%s' "$json1" "$json2" | jq -cs '.[0] * .[1]')

# Print the merged JSON
echo "$merged_json"

0 comments on commit e1d2258

Please sign in to comment.