Key Facts
- Category
- Data Processing
- Input Types
- textarea
- Output Type
- text
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Unzip Arrays tool allows you to instantly reverse the grouping of data by splitting a nested array of grouped values back into their original, individual arrays using the lodash _.unzip method.
When to Use
- •When you need to reorganize data that was previously combined using a zip operation.
- •When you have a list of paired records and need to extract each column into its own separate array.
- •When processing JSON data structures that require transposing rows into columns for easier analysis.
How It Works
- •Input your grouped data as a valid JSON array of arrays into the text area.
- •The tool processes the input using the lodash _.unzip function to reorder the elements.
- •The output is generated as a new JSON array containing the separated, individual arrays.
Use Cases
Examples
1. Separating Paired User Data
- Background
- A developer has a list of user IDs and their corresponding scores grouped together as pairs.
- Problem
- The developer needs to perform calculations on all scores independently of the user IDs.
- How to Use
- Paste the grouped array into the input field and run the tool.
- Example Config
-
[["User1", 85], ["User2", 92], ["User3", 78]] - Outcome
- The tool returns [["User1", "User2", "User3"], [85, 92, 78]], allowing the developer to isolate the score array.
2. Transposing Coordinate Pairs
- Background
- A data scientist has a set of X and Y coordinate pairs collected from a sensor.
- Problem
- The plotting software requires an array of all X values and an array of all Y values separately.
- How to Use
- Input the coordinate pairs into the tool to transpose the structure.
- Example Config
-
[[1, 10], [2, 20], [3, 30]] - Outcome
- The tool outputs [ [1, 2, 3], [10, 20, 30] ], which can be directly mapped to chart axes.
Try with Samples
jsonRelated Hubs
FAQ
What does this tool do?
It takes an array of grouped arrays and transposes them, effectively splitting the groups into separate arrays based on their index.
Does it support non-JSON inputs?
No, the tool requires a valid JSON array format to correctly parse and process the data.
Can I use this to reverse a zip operation?
Yes, this tool is specifically designed to perform the inverse of a zip operation.
What library does this tool use?
It utilizes the standard lodash _.unzip function for reliable and consistent data processing.
Is there a limit to the array size?
The tool handles standard JSON array sizes, though performance may vary depending on the complexity and depth of the input data.