# 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 10000
- `keys` (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:

```json
{
  "array": [
    {
      "a": 1,
      "b": 2,
      "c": 3
    },
    {
      "a": 4,
      "c": 6
    }
  ],
  "keys": [
    "b",
    "c"
  ]
}
```

Response:

```json
{
  "result": {
    "result": [
      {
        "a": 1
      },
      {
        "a": 4
      }
    ],
    "count": 2
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "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)

```sh
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](/v1/tools/json-array-drop-keys/versions/1.0.0).

### CLI

```sh
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/](/clients/cli/).

## Related tools

- [JSON array project](/tools/json-array-project): Select specific keys from each object in a JSON array.
- [JSON array rename keys](/tools/json-array-rename-keys): Rename specific keys in each object in a JSON array.
- [JSON array anti join](/tools/json-array-anti-join): Anti join two JSON arrays of objects on exact keys.
- [JSON array group by](/tools/json-array-group-by): Group an array of JSON objects by exact keys.
- [JSON array group count](/tools/json-array-group-count): Group an array of JSON objects by exact keys and return the count.
- [JSON array inner join](/tools/json-array-inner-join): Inner join two JSON arrays of objects on exact keys.
