array_symmetric_difference

Computes the symetric difference of arrays.

{% json array_1 %}[1,2,3,4,5]{% endjson %}
{% json array_2 %}[1,2,3]{% endjson %}
{% assign ar_symm_difference = array_1 | array_symmetric_difference: array_2 %}

{{ ar_symm_difference | log }} {% comment %} Logs [4,5] to console {% endcomment %}

Last updated