# JSON Array Pluck Field

Paste a JSON array, wrapper object, or NDJSON and extract one key or dotted path from every row as lines, CSV, TSV, JSON, or a custom-delimited list.

## Run it

- **CLI:** `gizza tool json-array-pluck-field '[{"user":{"name":"Ada"},"email":"ada@example.test"},{"user":{"name":"Grace"},"email":"grace@example.test"}]' 'field=user.name'`
- **Web:** https://gizza.ai/tools/json-array-pluck-field/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/json-array-pluck-field/tool.json

## Inputs

- `json` — JSON array, wrapper object, or NDJSON _(field)_
- `field` — Field or dotted path to pluck _(field)_
- `root` — Root array path (optional) _(field)_
- `format` — Output format _(field)_
- `delimiter` — Custom delimiter _(field)_
- `quote` — Quote every text value _(field)_
- `missing` — Missing or null fields _(field)_
- `complex_values` — Object or array values _(field)_
- `unique` — Drop duplicate values _(field)_

## Output

- Plucked values (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `json` — JSON array, wrapper object, or NDJSON
- `field` — Field or dotted path to pluck
- `root` — Root array path (optional)
- `format` — Output format
- `delimiter` — Custom delimiter
- `quote` — Quote every text value
- `missing` — Missing or null fields
- `complex_values` — Object or array values
- `unique` — Drop duplicate values

Example: `https://gizza.ai/tools/json-array-pluck-field/?json=%5B%7B%22user%22%3A%7B%22name%22%3A%22Ada%22%7D%2C%22email%22%3A%22ada%40example.test%22%7D%2C%7B%22user%22%3A%7B%22name%22%3A%22Grace%22%7D%2C%22email%22%3A%22grace%40example.test%22%7D%5D&field=user.name&root=data.items&format=lines&delimiter=%20%7C%20&quote=true&missing=skip&complex_values=json&unique=true`

---

## About this tool

JSON Array Pluck Field extracts the same key from every row in a JSON array and returns a flat list. It is useful when you have API results, export files, webhook payloads, or NDJSON logs and only need one column such as `id`, `email`, `user.name`, or `orders.*.total`.

Paste a top-level array, a wrapper object such as `{ "items": [...] }`, NDJSON lines, or a single object. Then enter a field name or dotted path. The output can be one value per line, CSV, TSV, a JSON array that preserves number and boolean types, or a custom-delimited list.

### Worked example

Input JSON:

```json
[{"user":{"name":"Ada"},"email":"ada@example.test"},{"user":{"name":"Grace"},"email":"grace@example.test"}]
```

Field:

```text
user.name
```

Output:

```text
Ada
Grace
```

Use `root` when an API response wraps rows under a property such as `data`, `items`, or `response.results`. Use `*` to fan out arrays (`orders.*.total`) and `**` or JSONPath-style `..` to find a key at any depth (`**.city`).

## Limits and edge cases

- Maximum input size is 5,000,000 bytes.
- Field and root paths are limited to 200 bytes each.
- At most 200,000 values are returned in one run.
- Missing fields are skipped by default; switch to empty, null, or error mode when row alignment matters.
- Object and array values are emitted as compact JSON by default; they can be labelled or skipped.
- This is not a general JSON query language. It deliberately focuses on the common "pluck one field from every row" workflow.

## FAQ

<details>
<summary>Can I extract nested values?</summary>

Yes. Use dotted paths such as `user.name`, indexes such as `tags.0` or `tags[0]`, wildcard paths such as `orders.*.total`, and recursive descent such as `**.city` or `$..city`.

</details>

<details>
<summary>What if my array is inside an API response object?</summary>

Set the root array path, for example `items`, `data.results`, or `response.records`. If root is blank, the tool uses a top-level array as-is or the first array-valued property in a wrapper object.

</details>

<details>
<summary>How are missing or null fields handled?</summary>

The default is to skip rows where the value is missing or null. Choose `empty` to keep row positions with blank values, `null` to emit the word `null`, or `error` to stop on the first missing row and report its index.

</details>

<details>
<summary>Can I produce CSV or a quoted list?</summary>

Yes. Choose CSV or TSV for delimiter-separated output with RFC-style quoting. Turn on "Quote every text value" for SQL-style or JavaScript-style quoted lists in lines or custom-delimited output.

</details>

## Related tools

- [Elasticsearch Bulk Formatter](https://gizza.ai/tools/elasticsearch-bulk-formatter/): Build a compact Elasticsearch _bulk API body from a JSON array. Choose index/create/update/delete, _index, _id field, and doc_as_upsert locally.
- [Format and filter structured JSON logs](https://gizza.ai/tools/json-log-formatter/): Pretty-print JSON log lines, flatten nested fields, filter by level or field, and export readable logs as text, table, JSON, or CSV.
- [JSON Path Editor](https://gizza.ai/tools/json-path-edit/): Get, set, or delete a value at a dotted or bracketed path in a JSON document. Supports array indices, quoted keys, and auto-created intermediates.
- [JSONL stats](https://gizza.ai/tools/jsonl-stats/): Summarize JSON Lines records: record count, per-key coverage, value-type distribution, distinct counts, samples, and numeric/string stats.
- [NDJSON to matrix](https://gizza.ai/tools/ndjson-to-matrix/): Turn NDJSON / JSON Lines records into one aligned table: unified columns from dotted paths, chosen fill for missing cells, CSV, TSV, matrix or JSON out.
