JSON group by field
ClientTurn a flat array of objects into an object whose keys are field values and whose values are arrays of matching rows—handy for quick aggregation before export or mock data.
Learn more: grouping array rows
Collect each object in a root array under a key taken from one property value—output is an object mapping those keys to arrays of rows.
Versus sort or unique
Grouping keeps every row in buckets. Unique-by collapses duplicates; sort reorders the flat list without changing membership.
Key strings
Object and array field values become JSON strings in group keys. Missing properties use (missing).
Nearby workflows on Toolcore
- JSON unique by field — Deduplicate JSON array rows by one field—keep first or last; local only. once JSON text parses on this page.
- Sort JSON array by field — Sort a JSON array of objects by one property—asc or desc; local only. once JSON text parses on this page.
- JSON pick or omit keys — Keep or drop top-level keys on an object or array of objects—case-sensitive; local only. once JSON text parses on this page.
- JSON formatter — JSON format online: pretty-print, minify, validate, escape, download . once JSON text parses on this page.
Group array by field
?
Root must be an array of objects. Each object is placed under a key derived from the chosen field value—missing fields use (missing).
2 groups.
Common use cases
- Bucket API list results by status, category, or tenant before exporting to files.
- Build quick histogram-style views from flat event arrays without a spreadsheet.
- Prepare grouped fixtures for UI mocks where each key maps to a list of rows.
Common mistakes to avoid
Expecting nested grouping
Only one top-level field is used. Multi-level pivots need repeated passes or a query tool.
Using non-object array elements
Every row must be a plain JSON object. Primitives or nested arrays at the root are rejected.
FAQ
How are missing fields grouped?
Objects without the chosen property land under a "(missing)" key.
Is data uploaded?
No. Parsing and grouping run entirely in your browser.
How is this different from unique-by or sort?
Group by keeps every row in buckets. Unique-by collapses duplicates; sort reorders the flat array.
Common search terms
Phrases people search for that match this tool. See the full long-tail keyword index.
- json group by field
- group json array by key
- json lodash groupby online
More tools
Related utilities you can open in another tab—mostly client-side.
JSON unique by field
ClientDeduplicate JSON array rows by one field—keep first or last; local only.
Sort JSON array by field
ClientSort a JSON array of objects by one property—asc or desc; local only.
JSON pick or omit keys
ClientKeep or drop top-level keys on an object or array of objects—case-sensitive; local only.
JSON formatter
ClientJSON format online: pretty-print, minify, validate, escape, download .json.