Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The Array Tools connector provides operations for working with arrays — filtering, sorting, grouping, deduplication, set operations, and more.
No connection required — this utility connector works out of the box.

Tools

array
any[]
required
Array to filter.
key
string
Object property to filter on (for arrays of objects).
operator
string
required
Operator: equals, not_equals, contains, gt, gte, lt, lte, exists, or not_exists.
value
any
Value to compare.
Example request:
{
  "array": [
    { "name": "Alice", "age": 30 },
    { "name": "Bob", "age": 25 },
    { "name": "Carol", "age": 35 }
  ],
  "key": "age",
  "operator": "gte",
  "value": 30
}
Example response:
{
  "items": [
    { "name": "Alice", "age": 30 },
    { "name": "Carol", "age": 35 }
  ],
  "count": 2
}
array
any[]
required
Array to sort.
key
string
Property to sort by (for arrays of objects).
order
string
default:"asc"
Sort order: asc or desc.
Example request:
{
  "array": [
    { "name": "Carol", "score": 88 },
    { "name": "Alice", "score": 95 },
    { "name": "Bob", "score": 72 }
  ],
  "key": "score",
  "order": "desc"
}
Example response:
{
  "items": [
    { "name": "Alice", "score": 95 },
    { "name": "Carol", "score": 88 },
    { "name": "Bob", "score": 72 }
  ],
  "count": 3
}
array
any[]
required
Array to deduplicate.
key
string
Property to check for uniqueness (for arrays of objects).
Example request:
{
  "array": [
    { "city": "Portland", "state": "OR" },
    { "city": "Seattle", "state": "WA" },
    { "city": "Portland", "state": "ME" }
  ],
  "key": "city"
}
Example response:
{
  "items": [
    { "city": "Portland", "state": "OR" },
    { "city": "Seattle", "state": "WA" }
  ],
  "count": 2
}
array
any[]
required
Array to search.
key
string
required
Property to match on.
value
any
required
Value to find.
Example request:
{
  "array": [
    { "id": 1, "name": "Alice" },
    { "id": 2, "name": "Bob" },
    { "id": 3, "name": "Carol" }
  ],
  "key": "id",
  "value": 2
}
Example response:
{
  "item": { "id": 2, "name": "Bob" }
}
array
any[]
required
Array to flatten.
depth
number
Depth to flatten (all levels if omitted).
Example request:
{
  "array": [1, [2, 3], [4, [5, 6]]],
  "depth": 1
}
Example response:
{
  "items": [1, 2, 3, 4, [5, 6]],
  "count": 5
}
array
any[]
required
Array to chunk.
size
number
required
Chunk size (minimum 1).
Example request:
{
  "array": ["a", "b", "c", "d", "e"],
  "size": 2
}
Example response:
{
  "items": [["a", "b"], ["c", "d"], ["e"]],
  "count": 3
}
array
any[]
required
Source array.
count
number
default:"1"
Number of elements to return.
Example request:
{
  "array": [10, 20, 30, 40, 50],
  "count": 3
}
Example response:
{
  "items": [10, 20, 30],
  "count": 3
}
array
any[]
required
Source array.
count
number
default:"1"
Number of elements to return.
Example request:
{
  "array": [10, 20, 30, 40, 50],
  "count": 2
}
Example response:
{
  "items": [40, 50],
  "count": 2
}
array
any[]
required
Array to group.
key
string
required
Property to group by.
Example request:
{
  "array": [
    { "name": "Alice", "department": "Engineering" },
    { "name": "Bob", "department": "Sales" },
    { "name": "Carol", "department": "Engineering" },
    { "name": "Dave", "department": "Sales" }
  ],
  "key": "department"
}
Example response:
{
  "entries": {
    "Engineering": [
      { "name": "Alice", "department": "Engineering" },
      { "name": "Carol", "department": "Engineering" }
    ],
    "Sales": [
      { "name": "Bob", "department": "Sales" },
      { "name": "Dave", "department": "Sales" }
    ]
  },
  "count": 2
}
Extract a single property from each object in the array.
array
any[]
required
Array of objects.
key
string
required
Property to extract.
Example request:
{
  "array": [
    { "id": 1, "name": "Alice" },
    { "id": 2, "name": "Bob" },
    { "id": 3, "name": "Carol" }
  ],
  "key": "name"
}
Example response:
{
  "items": ["Alice", "Bob", "Carol"],
  "count": 3
}
array
any[]
required
Array to reverse.
Example request:
{
  "array": [1, 2, 3, 4, 5]
}
Example response:
{
  "items": [5, 4, 3, 2, 1],
  "count": 5
}
array
any[]
required
Array to shuffle.
Example request:
{
  "array": [1, 2, 3, 4, 5]
}
Example response:
{
  "items": [3, 5, 1, 4, 2],
  "count": 5
}
Removes null, undefined, false, 0, "", and NaN.
array
any[]
required
Array to compact.
Example request:
{
  "array": [0, 1, false, 2, "", 3, null, 4]
}
Example response:
{
  "items": [1, 2, 3, 4],
  "count": 4
}
Get elements that exist in all provided arrays.
arrays
any[][]
required
Arrays to intersect.
Example request:
{
  "arrays": [
    [1, 2, 3, 4],
    [2, 4, 6, 8],
    [2, 3, 4, 5]
  ]
}
Example response:
{
  "items": [2, 4],
  "count": 2
}
Get elements in the first array that don’t exist in the second.
array
any[]
required
Primary array.
exclude
any[]
required
Values to exclude.
Example request:
{
  "array": [1, 2, 3, 4, 5],
  "exclude": [2, 4, 6]
}
Example response:
{
  "items": [1, 3, 5],
  "count": 3
}
Get unique values across all arrays.
arrays
any[][]
required
Arrays to union.
Example request:
{
  "arrays": [
    [1, 2, 3],
    [2, 3, 4],
    [3, 4, 5]
  ]
}
Example response:
{
  "items": [1, 2, 3, 4, 5],
  "count": 5
}
array
any[]
required
Array to measure.
Example request:
{
  "array": ["apple", "banana", "cherry"]
}
Example response:
{
  "result": 3
}
array
any[]
required
Source array.
start
number
default:"0"
Start index.
end
number
End index (exclusive).
Example request:
{
  "array": ["a", "b", "c", "d", "e"],
  "start": 1,
  "end": 4
}
Example response:
{
  "items": ["b", "c", "d"],
  "count": 3
}
array
any[]
required
Array to join.
separator
string
default:","
Separator between elements.
Example request:
{
  "array": ["alice", "bob", "carol"],
  "separator": " | "
}
Example response:
{
  "result": "alice | bob | carol"
}