{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-logic-codec-entries-decode",
  "title": "JSON Record Entries Decode",
  "section": "Library asset reference",
  "description": "Split typed entries value at configured index (default 0, inclusive 0..length). Output optional item , remaining rest , original count ; at length omits item. Empty list produces rest=[], count=0. Example [{key:\"x\",value:0}] → item={key:\"x\"",
  "kind": "node",
  "url": "/wiki/reference-logic-codec-entries-decode/",
  "markdown": "/wiki/reference-logic-codec-entries-decode/index.md",
  "json": "/wiki/reference-logic-codec-entries-decode/index.json",
  "headings": [
    {
      "id": "audited-socket-contract-21-october-2026",
      "title": "Audited socket contract (21 October 2026)",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "logic",
  "contract": {
    "key": "logic.codec.entries.decode",
    "slug": "logic-codec-entries-decode",
    "name": "JSON Record Entries Decode",
    "kind": "node",
    "family": "logic",
    "packId": null,
    "category": "Data/Codecs",
    "description": "Split typed entries `value` at configured `index` (default 0, inclusive 0..length). Output optional `item`, remaining `rest`, original `count`; at length omits item. Empty list produces rest=[], count=0. Example [{key:\"x\",value:0}] → item={key:\"x\",value:0}, rest=[], count=1.",
    "inputs": [
      {
        "id": "exec",
        "name": "Execute",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "value",
        "name": "Value",
        "type": "@logic.type.entries",
        "typeName": "JSON Record Entries",
        "typeKey": "logic.type.entries",
        "typeVersion": 1,
        "required": true
      }
    ],
    "outputs": [
      {
        "id": "next",
        "name": "Next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "item",
        "name": "Item",
        "type": "@logic.type.entry",
        "typeName": "JSON Record Entry",
        "typeKey": "logic.type.entry",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "rest",
        "name": "Rest",
        "type": "@logic.type.entries",
        "typeName": "JSON Record Entries",
        "typeKey": "logic.type.entries",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "count",
        "name": "Count",
        "type": "number",
        "typeName": "Number",
        "required": true
      },
      {
        "id": "error",
        "name": "On error",
        "type": "control",
        "typeName": "Control",
        "required": false
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000,
          "default": 0
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "documentation": "Split typed entries `value` at configured `index` (default 0, inclusive 0..length). Output optional `item`, remaining `rest`, original `count`; at length omits item. Empty list produces rest=[], count=0. Example [{key:\"x\",value:0}] → item={key:\"x\",value:0}, rest=[], count=1.\n\nPure transformation: no I/O, secrets, persistence or external effects. Text is limited to 1 MiB UTF-8; JSON values to 1 MiB serialized JSON; lists to 10000 items. Configuration uses only the listed schema fields. Invalid sizes, indices, types or duplicate keys throw through On error; there are no retries. Missing is distinct from null. Custom type pins are exact immutable dependencies. Generic JSON values remain deliberate dynamic boundaries, not provider entity types.\n\n## Audited socket contract (21 October 2026)\n\nInputs:\n- `value`: `@logic.type.entries`; required.\n\nOutputs:\n- `item`: `@logic.type.entry`; optional (absent stays absent).\n- `rest`: `@logic.type.entries`; required.\n- `count`: `number`; required.\n\nConfiguration:\n- `index`: integer; default 0\n\nKnown provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.",
    "runtime": "javascript",
    "tags": [
      "codec",
      "data/codecs",
      "general-purpose",
      "library-expansion",
      "node"
    ],
    "source": "baseline-catalog"
  }
}
