JSON array drop keys
json-array-drop-keys · version 1.0.0 · JSON & JSONL · free, no key needed
Remove specific keys from each object in a JSON array.
Use when you need to: json array drop keys · remove keys from json array · omit json array fields.
Supported
- json array drop keys
- remove keys from json array
- omit json array fields
Not supported
- deep dropping
Behavior
- Outputs a new array where each object has the specified keys removed.
- Keys that do not exist in an object are ignored.
Input
array(array of object, required): max items 10000keys(array of string, required): min items 1; max items 32; each min length 1
Output
result(array of object, required)count(integer, required)
Limits
- max array items: 10000
- max output items: 10000
- max keys: 32
Example
Request input:
{
"array": [
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"c": 6
}
],
"keys": [
"b",
"c"
]
}
Response:
{
"result": {
"result": [
{
"a": 1
},
{
"a": 4
}
],
"count": 2
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "json-array-drop-keys",
"version": "1.0.0",
"input": {
"array": [
{
"a": 1,
"b": 2,
"c": 3
},
{
"a": 4,
"c": 6
}
],
"keys": [
"b",
"c"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/json-array-drop-keys/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"array":[{"a":1,"b":2,"c":3},{"a":4,"c":6}],"keys":["b","c"]}'
The machine-readable contract is at /v1/tools/json-array-drop-keys/versions/1.0.0.
CLI
node cli.mjs run json-array-drop-keys 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- JSON array project: Select specific keys from each object in a JSON array.
- JSON array rename keys: Rename specific keys in each object in a JSON array.
- JSON array anti join: Anti join two JSON arrays of objects on exact keys.
- JSON array group by: Group an array of JSON objects by exact keys.
- JSON array group count: Group an array of JSON objects by exact keys and return the count.
- JSON array inner join: Inner join two JSON arrays of objects on exact keys.