Categories

Unzip Arrays

Split grouped arrays using lodash _.unzip

Separate grouped arrays back into individual arrays.

Highlights:

  • Uses lodash _.unzip
  • Accepts an array of grouped values
  • Works with arrays produced by zip

Example:

  • Grouped: [["a", 1], ["b", 2]]
  • Result: [["a", "b"], [1, 2]]

Enter a JSON array of grouped values

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

Transposing database query results from row-based records to column-based arrays.
Preparing grouped data for charting libraries that require separate data series arrays.
Cleaning up API responses that return paired data points that need to be analyzed independently.

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

json

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

API Documentation

Request Endpoint

POST /en/api/tools/unzip-arrays

Request Parameters

Parameter Name Type Required Description
grouped textarea Yes Enter a JSON array of grouped values

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-unzip-arrays": {
      "name": "unzip-arrays",
      "description": "Split grouped arrays using lodash _.unzip",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=unzip-arrays",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]