Key Facts
- Category
- Data Processing
- Input Types
- textarea, checkbox
- Output Type
- text
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Intersection Arrays tool identifies common values shared across two or three JSON arrays using the lodash _.intersection method. It supports optional case-insensitive matching for string arrays, enabling efficient data comparison and filtering.
When to Use
- •When you need to find overlapping elements between multiple lists or datasets.
- •When comparing arrays to filter out only the shared values for analysis or reporting.
- •When working with string data where case sensitivity might affect the intersection results.
How It Works
- •Enter the first JSON array in the 'Array 1' input field.
- •Enter the second JSON array in the 'Array 2' input field.
- •Optionally, provide a third array in the 'Array 3' field for three-way intersection.
- •Adjust the 'Case Sensitive' checkbox to enable or disable case-insensitive matching for strings.
Use Cases
Examples
1. Finding Common Product IDs
- Background
- An e-commerce analyst has two lists of product IDs from different sales channels.
- Problem
- Need to determine which products are sold in both channels for inventory sync.
- How to Use
- Input the product ID arrays into Array 1 and Array 2 fields.
- Outcome
- A JSON array of product IDs common to both lists.
2. Case-Insensitive Username Matching
Software Developer- Background
- Comparing usernames from a legacy system and a new system where cases differ.
- Problem
- Usernames are stored in mixed case, but need to find exact matches ignoring case.
- How to Use
- Enter the username arrays and uncheck the 'Case Sensitive' option.
- Outcome
- A list of usernames that match regardless of letter case.
3. Three-List Email Subscriber Intersection
- Background
- A marketing team has three email lists from different campaigns.
- Problem
- Want to find subscribers who are common to all three campaigns for targeted outreach.
- How to Use
- Input the three email arrays into Array 1, Array 2, and Array 3 fields.
- Outcome
- An array of email addresses present in all three lists.
Try with Samples
json, textRelated Hubs
FAQ
How many arrays can I compare at once?
You can compare two or three arrays simultaneously.
What types of data does it support?
It supports any JSON array, including numbers, strings, and other data types.
Can I perform case-insensitive matching?
Yes, uncheck the 'Case Sensitive' option to ignore case differences in string arrays.
What is the output format?
The result is a JSON array containing the common values from all input arrays.
Is there a limit on the number of elements in arrays?
The tool handles arrays as per standard JSON limits; no specific size restriction is imposed.