数组交集
使用 lodash _.intersection 查找多个数组的共同值
找出在所有提供数组中都出现的共享值。
**亮点:**
- 使用 lodash `_.intersection`
- 支持 2-3 个 JSON 数组
- 可选字符串不区分大小写匹配
**示例:**
- 数组 1:`[1, 2, 3]`
- 数组 2:`[2, 3, 4]`
- 结果:`[2, 3]`
API 文档
请求端点
POST /zh/api/tools/intersection-arrays
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| array1 | textarea | 是 | 输入 JSON 数组 |
| array2 | textarea | 是 | 输入 JSON 数组 |
| array3 | textarea | 否 | 可选的第三个数组 |
| caseSensitive | checkbox | 否 | 取消勾选以进行不区分大小写的匹配 |
响应格式
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
文本:
文本
AI MCP 文档
将此工具添加到您的 MCP 服务器配置中:
{
"mcpServers": {
"elysiatools-intersection-arrays": {
"name": "intersection-arrays",
"description": "使用 lodash _.intersection 查找多个数组的共同值",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=intersection-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]