Key Facts
- Category
- Data Processing
- Input Types
- textarea
- Output Type
- text
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Xor Arrays tool allows you to quickly compute the symmetric difference between multiple datasets by identifying values that appear in exactly one of the provided JSON arrays.
When to Use
- •When you need to identify unique items present in one list but missing from another.
- •When comparing two or more datasets to find non-overlapping elements.
- •When cleaning data by isolating values that do not share commonality across multiple groups.
How It Works
- •Input your data as valid JSON arrays into the provided fields.
- •The tool utilizes the lodash _.xor function to process the inputs.
- •The system calculates the symmetric difference and returns a single array containing only the unique values.
Use Cases
Examples
1. Comparing User Access Lists
System Administrator- Background
- I have two lists of user IDs from different departments and need to see which users are not shared between them.
- Problem
- Manually checking hundreds of IDs for discrepancies is prone to human error.
- How to Use
- Paste the first list into Array 1 and the second list into Array 2, then run the tool.
- Example Config
-
Array 1: [101, 102, 103], Array 2: [102, 103, 104] - Outcome
- The tool returns [101, 104], highlighting the IDs that are unique to each list.
2. Syncing Product Inventories
E-commerce Manager- Background
- I need to find which products are listed in my warehouse system but missing from my online store catalog.
- Problem
- Identifying non-matching product SKUs across two separate JSON exports.
- How to Use
- Input the warehouse SKU array and the online store SKU array to isolate the differences.
- Example Config
-
Array 1: ["SKU-A", "SKU-B"], Array 2: ["SKU-B", "SKU-C"] - Outcome
- The tool returns ["SKU-A", "SKU-C"], showing which items are not present in both systems.
Try with Samples
jsonRelated Hubs
FAQ
What is a symmetric difference?
A symmetric difference consists of elements that are in either of the sets, but not in their intersection.
How many arrays can I compare at once?
You can compare between 2 and 4 JSON arrays simultaneously.
What format should my input be in?
Inputs must be valid JSON arrays, such as [1, 2, 3] or ["apple", "banana"].
Does the order of the arrays matter?
No, the symmetric difference operation is commutative, so the order of the arrays does not change the result.
What happens if I provide duplicate values within a single array?
The tool processes the arrays based on the behavior of lodash _.xor, which focuses on the presence of values across the provided sets.