Key Facts
- Category
- Data Processing
- Input Types
- textarea, checkbox
- Output Type
- text
- Sample Coverage
- 4
- API Ready
- Yes
Overview
This tool removes all occurrences of specified values from an array using the lodash _.pull method. It accepts JSON arrays for both input and values to remove, with an optional case-insensitive matching feature for strings.
When to Use
- •When cleaning data arrays by removing null, duplicate, or erroneous entries.
- •For filtering lists in programming or data processing to exclude specific elements.
- •To manage arrays by deleting unwanted values efficiently in workflows.
How It Works
- •Input your array as a JSON array in the 'Array' field.
- •Specify the values to remove as a JSON array in the 'Values to Remove' field.
- •Optionally uncheck 'Case Sensitive' for case-insensitive string matching.
- •The tool processes the input and returns the modified array with values removed.
Use Cases
Examples
1. Remove Erroneous Sensor Readings
Data Engineer- Background
- An IoT system collects temperature data, but some sensors send invalid readings like -999 that skew results.
- Problem
- The array contains erroneous values that need removal for reliable analysis.
- How to Use
- Enter the sensor readings array in the 'Array' field and specify [-999] in the 'Values to Remove' field.
- Example Config
-
Array: [22.5, -999, 23.1, -999, 24.0], Values: [-999] - Outcome
- The tool returns [22.5, 23.1, 24.0], with all -999 values removed.
2. Filter Banned Usernames
Community Moderator- Background
- A forum maintains a list of usernames, and moderators need to remove banned users' names, ignoring case variations.
- Problem
- Banned usernames appear in different cases, making manual filtering inefficient.
- How to Use
- Input the username array and the list of banned names. Uncheck 'Case Sensitive' to catch all variations.
- Example Config
-
Array: ['Alice', 'bob', 'BOB', 'Charlie'], Values: ['bob'], Case Sensitive: false - Outcome
- The result is ['Alice', 'Charlie'], with both 'bob' and 'BOB' removed due to case-insensitive matching.
Try with Samples
json, video, textRelated Hubs
FAQ
What does this tool do?
It removes all instances of specified values from an input array using lodash _.pull.
Can it handle non-JSON inputs?
No, both the array and values must be valid JSON arrays.
Is case sensitivity enabled by default?
Yes, string matching is case-sensitive by default; uncheck the option for case-insensitive removal.
What types of values can be removed?
Any JSON-compatible values, such as numbers, strings, or objects.
Does it modify the original array?
No, it returns a new array with the specified values removed, leaving the input unchanged.