数组拼接
使用 lodash _.concat 拼接多个数组
## 功能
- **拼接最多 5 个数组**为一个数组
- **可选扁平化**结果中的嵌套数组(不扁平/浅扁平/深扁平)
- **可选去重**以删除重复值
- **智能类型检测**支持数字、布尔值和对象
- **灵活的输入格式** - JSON 数组或文本表示
## 使用示例
**基本拼接:**
```
数组 1: [1, 2]
数组 2: [3, 4]
数组 3: [5, 6]
结果: [1, 2, 3, 4, 5, 6]
```
**嵌套数组(启用扁平化):**
```
数组 1: [1, 2]
数组 2: [[3, 4], 5]
结果: [1, 2, 3, 4, 5]
```
**启用去重:**
```
数组 1: [1, 2, 3]
数组 2: [3, 4, 5]
结果(去重): [1, 2, 3, 4, 5]
```
API 文档
请求端点
POST /zh/api/tools/concat-arrays
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| array1 | textarea | 是 | - |
| array2 | textarea | 否 | - |
| array3 | textarea | 否 | - |
| array4 | textarea | 否 | - |
| array5 | textarea | 否 | - |
| flattenMode | select | 否 | - |
| unique | checkbox | 否 | - |
响应格式
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
文本:
文本
AI MCP 文档
将此工具添加到您的 MCP 服务器配置中:
{
"mcpServers": {
"elysiatools-concat-arrays": {
"name": "concat-arrays",
"description": "使用 lodash _.concat 拼接多个数组",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=concat-arrays",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。
如果遇见问题,请联系我们:[email protected]