{
  "title": "JSON array grouper",
  "human_url": "https://happytails.ai/en/data-tools/json-array-grouper/",
  "agent_url": "https://happytails.ai/agents/en/data-tools/json-array-grouper/",
  "language": "en",
  "markdown_url": "https://happytails.ai/en/data-tools/json-array-grouper.md",
  "content": "JSON array grouper\nGroup JSON records by one or more nested values. Keep every source record and download the grouped result.\nHow can we improve this tool?\nReport a problem or share an idea.\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\nHow to use JSON array grouper\nPaste a JSON array of records.\nEnter grouping paths as a JSON array and choose how to handle missing fields.\nReview the group and record counts, then download the JSON result and report.\nUseful next steps\nJSON path inventory\nJSON flattener\nJSONL filter\nGroup by a field or a combination of fields\nPaste a JSON array and choose 1 to 10 JSON Pointer paths, such as [\"/country\",\"/address/city\"]. Each unique combination becomes a group with its key values, record count and original records. Groups follow first occurrence and records retain their input order.\nKeep missing values distinct from null\nA missing field gets a separate group by default. Choose Reject record to require all selected paths in every record. Strings, numbers and booleans remain different types. Objects compare by their contents, independent of member order, while array order matters.\nDownload the full grouped dataset\nThe output contains keys, count and records for each group, plus a processing report. Paths use ~0 for a literal tilde and ~1 for a slash. An empty pointer selects the whole record. This tool groups records; it does not sum or average their values.",
  "content_format": "text/plain",
  "visibility": "public",
  "links": [
    {
      "name": "JSON path inventory",
      "url": "https://happytails.ai/en/data-tools/json-path-inventory/"
    },
    {
      "name": "JSON flattener",
      "url": "https://happytails.ai/en/data-tools/json-flattener/"
    },
    {
      "name": "JSONL filter",
      "url": "https://happytails.ai/en/data-tools/jsonl-filter/"
    }
  ],
  "tool": {
    "id": "json-array-grouper",
    "category": "data-tools",
    "built": true,
    "requirements": "At most 10,000 input records and 10 grouping paths. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate keys, negative zero and numbers that cannot safely retain their decimal value are rejected. Quote precision-sensitive numbers as strings. Formatting and object member order may change. Processing stays on your device. Each JSON Pointer is limited to 20,000 characters.",
    "implementation": {
      "fields": [
        {
          "key": "paths",
          "label": "Grouping JSON Pointers",
          "value": "[\"/category\"]",
          "type": "textarea",
          "help": "A JSON array of 1–10 distinct pointers. Use /address/country for a nested key and an empty pointer for the whole record."
        },
        {
          "key": "missing",
          "label": "Missing grouping fields",
          "value": "Separate group",
          "type": "select",
          "values": [
            "Separate group",
            "Reject record"
          ]
        }
      ],
      "live": true,
      "presentation": "metrics",
      "note": "Group an array by one or more field values. Missing fields and null form different groups. Complex values compare by structure; object member order does not affect grouping. Records and groups retain first-seen order. Runs on your device. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate JSON keys, unsafe integers, negative zero and decimals that would change on JSON serialization are rejected rather than rounded. Quote precision-sensitive numbers as strings. Output whitespace and object-member order may change. Each JSON Pointer is limited to 20,000 characters.",
      "experience": {
        "automatic": true,
        "single": false,
        "inputMaxLength": 1000000,
        "inputMode": "text",
        "label": "JSON input",
        "placeholder": "[{\"country\":\"PT\",\"score\":90},{\"country\":\"ES\",\"score\":80},{\"country\":\"PT\",\"score\":70}]",
        "help": "Paste text to process locally. Review the result before downloading. Results update as you type. Up to 1,000,000 characters.",
        "action": null
      },
      "mode": "automatic",
      "interactive": false
    },
    "execution": "Browser interface",
    "api": null,
    "browser_agent": {
      "supported": true,
      "name": "run_current_tool",
      "discovery": "WebMCP on the human page in a supporting browser",
      "verification": "See audit/API-AUDIT.md; availability is not verification"
    }
  },
  "markdown": "# JSON array grouper\n\n- Human page: https://happytails.ai/en/data-tools/json-array-grouper/\n- Markdown: https://happytails.ai/en/data-tools/json-array-grouper.md\n- Structured JSON: https://happytails.ai/agents/en/data-tools/json-array-grouper/index.json\n- Visibility: public\n\n## Tool capabilities\n\n| Property | Value |\n| --- | --- |\n| Tool ID | `json-array-grouper` |\n| Category | data-tools |\n| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |\n| Browser execution | Automatic updates after valid input or file selection. |\n| Browser processing | Browser; see tool notes for network behavior. |\n| HTTP API | Not callable through HTTP. |\n| Browser-agent interface | run_current_tool |\n\n### Implementation notes\n\nGroup an array by one or more field values. Missing fields and null form different groups. Complex values compare by structure; object member order does not affect grouping. Records and groups retain first-seen order. Runs on your device. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate JSON keys, unsafe integers, negative zero and decimals that would change on JSON serialization are rejected rather than rounded. Quote precision-sensitive numbers as strings. Output whitespace and object-member order may change. Each JSON Pointer is limited to 20,000 characters.\n\n### Inputs and settings\n\nText input: JSON input.\n\nExample or placeholder shown in the interface (not a validated fixture):\n\n```text\n[{\"country\":\"PT\",\"score\":90},{\"country\":\"ES\",\"score\":80},{\"country\":\"PT\",\"score\":70}]\n```\n\nPaste text to process locally. Review the result before downloading. Results update as you type. Up to 1,000,000 characters.\n\n| Setting | Meaning | Control type | Default | Constraints |\n| --- | --- | --- | --- | --- |\n| `paths` | Grouping JSON Pointers | textarea | \"[\\\"/category\\\"]\" |  |\n| `missing` | Missing grouping fields | select | \"Separate group\" | Allowed: Separate group, Reject record |\n\n### Browser-agent workflow\n\n1. Open the human page in a browser that supports WebMCP.\n2. Discover the interface exposed by that page; use its actual schema.\n3. Select files on the page first when the tool requires files.\n4. Call `run_current_tool` with valid input and settings.\n5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.\n\nCalls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.\n\n### Planning specification\n\nAt most 10,000 input records and 10 grouping paths. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate keys, negative zero and numbers that cannot safely retain their decimal value are rejected. Quote precision-sensitive numbers as strings. Formatting and object member order may change. Processing stays on your device. Each JSON Pointer is limited to 20,000 characters.\n\nThis describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.\n\n### Complete machine-readable capability record\n\n```json\n{\n  \"id\": \"json-array-grouper\",\n  \"category\": \"data-tools\",\n  \"built\": true,\n  \"requirements\": \"At most 10,000 input records and 10 grouping paths. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate keys, negative zero and numbers that cannot safely retain their decimal value are rejected. Quote precision-sensitive numbers as strings. Formatting and object member order may change. Processing stays on your device. Each JSON Pointer is limited to 20,000 characters.\",\n  \"implementation\": {\n    \"fields\": [\n      {\n        \"key\": \"paths\",\n        \"label\": \"Grouping JSON Pointers\",\n        \"value\": \"[\\\"/category\\\"]\",\n        \"type\": \"textarea\",\n        \"help\": \"A JSON array of 1–10 distinct pointers. Use /address/country for a nested key and an empty pointer for the whole record.\"\n      },\n      {\n        \"key\": \"missing\",\n        \"label\": \"Missing grouping fields\",\n        \"value\": \"Separate group\",\n        \"type\": \"select\",\n        \"values\": [\n          \"Separate group\",\n          \"Reject record\"\n        ]\n      }\n    ],\n    \"live\": true,\n    \"presentation\": \"metrics\",\n    \"note\": \"Group an array by one or more field values. Missing fields and null form different groups. Complex values compare by structure; object member order does not affect grouping. Records and groups retain first-seen order. Runs on your device. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate JSON keys, unsafe integers, negative zero and decimals that would change on JSON serialization are rejected rather than rounded. Quote precision-sensitive numbers as strings. Output whitespace and object-member order may change. Each JSON Pointer is limited to 20,000 characters.\",\n    \"experience\": {\n      \"automatic\": true,\n      \"single\": false,\n      \"inputMaxLength\": 1000000,\n      \"inputMode\": \"text\",\n      \"label\": \"JSON input\",\n      \"placeholder\": \"[{\\\"country\\\":\\\"PT\\\",\\\"score\\\":90},{\\\"country\\\":\\\"ES\\\",\\\"score\\\":80},{\\\"country\\\":\\\"PT\\\",\\\"score\\\":70}]\",\n      \"help\": \"Paste text to process locally. Review the result before downloading. Results update as you type. Up to 1,000,000 characters.\",\n      \"action\": null\n    },\n    \"mode\": \"automatic\",\n    \"interactive\": false\n  },\n  \"execution\": \"Browser interface\",\n  \"api\": null,\n  \"browser_agent\": {\n    \"supported\": true,\n    \"name\": \"run_current_tool\",\n    \"discovery\": \"WebMCP on the human page in a supporting browser\",\n    \"verification\": \"See audit/API-AUDIT.md; availability is not verification\"\n  }\n}\n```\n\n## Page guide\n\nGroup JSON records by one or more nested values. Keep every source record and download the grouped result.\n\nHow can we improve this tool?\n\nReport a problem or share an idea.\n\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\n\n### How to use JSON array grouper\n\n1. Paste a JSON array of records.\n2. Enter grouping paths as a JSON array and choose how to handle missing fields.\n3. Review the group and record counts, then download the JSON result and report.\n\n## Useful next steps\n\n- [JSON path inventory](https://happytails.ai/en/data-tools/json-path-inventory/) ([Markdown](https://happytails.ai/en/data-tools/json-path-inventory.md))\n\n- [JSON flattener](https://happytails.ai/en/data-tools/json-flattener/) ([Markdown](https://happytails.ai/en/data-tools/json-flattener.md))\n\n- [JSONL filter](https://happytails.ai/en/data-tools/jsonl-filter/) ([Markdown](https://happytails.ai/en/data-tools/jsonl-filter.md))\n\n## Group by a field or a combination of fields\n\nPaste a JSON array and choose 1 to 10 JSON Pointer paths, such as \\[\"/country\",\"/address/city\"\\]. Each unique combination becomes a group with its key values, record count and original records. Groups follow first occurrence and records retain their input order.\n\n### Keep missing values distinct from null\n\nA missing field gets a separate group by default. Choose Reject record to require all selected paths in every record. Strings, numbers and booleans remain different types. Objects compare by their contents, independent of member order, while array order matters.\n\n### Download the full grouped dataset\n\nThe output contains keys, count and records for each group, plus a processing report. Paths use ~0 for a literal tilde and ~1 for a slash. An empty pointer selects the whole record. This tool groups records; it does not sum or average their values.\n"
}