Symmetric Difference

Find elements in either array but not in both (exclusive OR).

Code

General
jq -n --argjson a "$arr1" --argjson b "$arr2" '($a - $b) + ($b - $a)'

Parameters

First array (JSON)

Second array (JSON)

Server

More Bash Snippets