Array duplicates find
array-duplicates-find · version 1.0.0 · Other utilities · free, no key needed
List duplicated JSON values with counts and first indexes, preserving first-seen order.
Use when you need to: find duplicate values in JSON array · list duplicates with counts · get repeated items and first indexes.
Decide before calling
Read the versioned contract and the supported scope below. Reuse array-duplicates-find@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use array-duplicates-find@1.0.0 for find duplicate values in JSON array. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- find duplicate values in JSON array
- list duplicates with counts
- get repeated items and first indexes
- count duplicate array values
- identify repeated JSON objects
- show duplicate positions in array
Not supported
- deduplicate the input array
- fuzzy or normalized equality
Behavior
- All outputs include standard_version.
- Input order is preserved when the result is set-like.
- Integers, decimal strings, and strings are compared without binary floating-point conversion.
- Pure synchronous processing with first-occurrence result ordering.
Input
values(array of any JSON value, required): max items 256
Output
standard_version(constant "RFC8785", required)duplicates(array of object, required): max items 256
Limits
- max input bytes: 32768
- max items: 256
- max iterations: 4095
- max output bytes: 32768
Example
Request input:
{
"values": [
1,
"1",
1,
{
"b": 2,
"a": 1
},
{
"a": 1,
"b": 2
}
]
}
Response:
{
"result": {
"standard_version": "RFC8785",
"duplicates": [
{
"value": 1,
"count": 2,
"first_index": 0
},
{
"value": {
"b": 2,
"a": 1
},
"count": 2,
"first_index": 3
}
]
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "array-duplicates-find",
"version": "1.0.0",
"input": {
"values": [
1,
"1",
1,
{
"b": 2,
"a": 1
},
{
"a": 1,
"b": 2
}
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/array-duplicates-find/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"values":[1,"1",1,{"b":2,"a":1},{"a":1,"b":2}]}'
The machine-readable contract is at /v1/tools/array-duplicates-find/versions/1.0.0.
CLI
node cli.mjs run array-duplicates-find 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Array set difference: Return unique left-array values absent from the right array, in first-seen order.
- Array set intersection: Return unique left-array values also in the right array, in first-seen order.
- Stats histogram: Count decimal-string values in caller-supplied fixed bins and return below- and above-range totals.
- Bytes format human: Format an exact byte count as both SI and IEC strings and return the rounding mode used.
- Cron describe fields: Parse a five-field cron expression and return each field’s expanded numeric values and wildcard status.
- Rtf inspect: Inspect an 8 KiB ANSI-1252 RTF text subset: paragraphs, omitted destinations, pictures, objects and warnings.