Skip to content

Commit

Permalink
Merge pull request #67 from johnbieren/fixmerge
Browse files Browse the repository at this point in the history
fix: merge-json doesn't merge properly
  • Loading branch information
johnbieren authored Oct 16, 2023
2 parents 68d2bd0 + e1d2258 commit 970ae76
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 970ae76

Please sign in to comment.