# Without Values

Remove specified values from an array using lodash _.without

> Canonical page: https://elysiatools.com/en/tools/without-values

- **Category:** Data Processing

- **Keywords:** array, without, remove, values, lodash

## Overview

Return a new array without the specified values.

**Highlights:**
- Uses lodash `_.without`
- Accepts values to remove as a JSON array
- Does not mutate the original array

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

## Inputs

- **Array** (textarea): Enter a JSON array
- **Values to Remove** (textarea): JSON array of values to remove

## When to use

- When you need to strip unwanted items from a large dataset or configuration array.
- When you want to sanitize user-provided input by filtering out blacklisted values.
- When performing data cleanup tasks where maintaining the integrity of the original array is required.

## How it works

- Paste your source data as a JSON array into the Array field.
- Define the specific elements you wish to exclude in the Values to Remove field as a JSON array.
- Click the process button to generate a new array containing only the remaining items.

## Use cases

- Cleaning up lists of IDs by removing deprecated or inactive entries.
- Filtering out specific status codes from a log array for cleaner reporting.
- Removing placeholder or default values from user-submitted configuration arrays.

## Frequently asked questions

### Does this tool modify my original array?

No, the tool returns a new array and does not mutate the original input.

### What format should my inputs be in?

Both the Array and Values to Remove fields require valid JSON array syntax, such as [1, 2, 3] or ["apple", "banana"].

### Can I remove multiple values at once?

Yes, simply include all the values you want to remove within the JSON array in the Values to Remove field.

### Is this tool case-sensitive?

Yes, when working with strings, the tool respects case sensitivity as per standard JavaScript comparison.

### What library does this tool use?

This tool utilizes the lodash _.without function to ensure consistent and accurate filtering.

## Related tools

- [Compact Array](https://elysiatools.com/en/tools/compact-array): Remove falsey values from array using lodash _.compact
- [Drop Items](https://elysiatools.com/en/tools/drop-items): Drop first N items from array using lodash _.drop
- [Drop Right Items](https://elysiatools.com/en/tools/drop-right-items): Drop last N items from array using lodash _.dropRight
- [Pull Values](https://elysiatools.com/en/tools/pull-values): Remove specific values from an array using lodash _.pull
- [Sorted Unique](https://elysiatools.com/en/tools/sorted-unique): Remove duplicates from a sorted array using lodash _.sortedUniq
- [Sorted Unique By](https://elysiatools.com/en/tools/sorted-unique-by): Remove duplicates from a sorted array using lodash _.sortedUniqBy
- [Uniq Array](https://elysiatools.com/en/tools/uniq-array): Remove duplicates from an array using lodash _.uniq
- [Uniq By](https://elysiatools.com/en/tools/uniq-by): Remove duplicates from an array using lodash _.uniqBy with a property path

## Samples

- [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
- [QR Code Samples](https://elysiatools.com/en/samples/qrcode-samples): Sample QR code images for testing QR code reading and generation tools
- [D3.js Data Visualization Samples](https://elysiatools.com/en/samples/d3js-data-visualization): Comprehensive D3.js data visualization examples including charts, maps, animations, and interactive visualizations
- [Rome JavaScript Toolchain Samples](https://elysiatools.com/en/samples/rome): Rome JavaScript toolchain examples including configuration, linting, formatting, bundling, and project management
