# Intersection Arrays

Find common values across multiple arrays using lodash _.intersection

> Canonical page: https://elysiatools.com/en/tools/intersection-arrays

- **Category:** Data Processing

- **Keywords:** array, intersection, common, overlap, filter, lodash

## Overview

Find the shared values that appear in every provided array.

**Highlights:**
- Uses lodash `_.intersection`
- Accepts 2-3 JSON arrays
- Optional case-insensitive matching for string arrays

**Example:**
- Array 1: `[1, 2, 3]`
- Array 2: `[2, 3, 4]`
- Result: `[2, 3]`

## Inputs

- **Array 1** (textarea): Enter a JSON array
- **Array 2** (textarea): Enter a JSON array
- **Array 3** (textarea): Optional third array
- **Case Sensitive** (checkbox): Uncheck for case-insensitive string matching

## 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

- Data deduplication: Finding common entries across multiple customer or product lists.
- Tag comparison: Identifying shared tags or categories in content management systems.
- User analysis: Comparing user IDs or emails from different platforms to find overlaps.

## Frequently asked questions

### 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.

## Related tools

- [Sorted Index](https://elysiatools.com/en/tools/sorted-index): Find the insertion index in a sorted array using lodash _.sortedIndex
- [Compact Array](https://elysiatools.com/en/tools/compact-array): Remove falsey values from array using lodash _.compact
- [Index Of](https://elysiatools.com/en/tools/index-of): Find the index of a value in array using lodash _.indexOf
- [Pull Values](https://elysiatools.com/en/tools/pull-values): Remove specific values from an array using lodash _.pull
- [Remove By Predicate](https://elysiatools.com/en/tools/remove-by-predicate): Remove items that match a predicate using lodash _.remove
- [Unzip Arrays](https://elysiatools.com/en/tools/unzip-arrays): Split grouped arrays using lodash _.unzip
- [Xor Arrays](https://elysiatools.com/en/tools/xor-arrays): Compute the symmetric difference of arrays using lodash _.xor
- [Zip Arrays](https://elysiatools.com/en/tools/zip-arrays): Combine arrays by index using lodash _.zip

## Samples

- [QR Code Samples](https://elysiatools.com/en/samples/qrcode-samples): Sample QR code images for testing QR code reading and generation tools
- [Distributed Tracing Samples](https://elysiatools.com/en/samples/distributed-tracing-samples): Comprehensive distributed tracing examples using Jaeger, OpenTelemetry, and other modern observability tools for microservices architecture
- [ELK Stack Log Analysis Samples](https://elysiatools.com/en/samples/elk-stack-samples): Comprehensive ELK Stack (Elasticsearch, Logstash, Kibana) samples for log aggregation, processing, and visualization in distributed systems
- [Grafana Advanced Application Samples](https://elysiatools.com/en/samples/grafana-samples): Comprehensive Grafana samples covering advanced dashboard design, alerting configurations, data source integrations, and plugin development

## Related content

- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [Text Case, Encoding, and Normalization Conversion Tools](https://elysiatools.com/en/hubs/text-convert): Compare text case conversion, character-width conversion, encoding conversion, quoted-printable handling, and inline text normalization tools in one hub.
- [JSON Inspection, Diff, and Transformation Tools](https://elysiatools.com/en/hubs/json-utility): Compare JSON formatting, diffing, path inspection, schema validation, merging, transformation, and export tools in one hub for API and data workflows.
- [Text Tools](https://elysiatools.com/en/hubs/text-utility): Explore 33 text tools for utility workflows and compare closely related utilities quickly.
