{"uid":"cap_Z0FDiUW-SvQRFAOQawIQe","slug":"json-array-index-by-key-78c7b360","name":"JSON Array Index By Key","description":"JSON Array Index By Key: JSON Array Index By Key indexes object rows by a unique top-level key and reports duplicates from bounded caller-supplied values without an external provider. Call JSON Array Index By Key before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Array Index By Key as versioned deterministic JSON. Pri…","url":"https://api.delx.ai/api/v1/x402/json-array-index-by-key","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","maxLength":8192,"description":"Key supplied to JSON Array Index By Key; used only for this bounded calculation and processed in memory without retention."},"items":{"type":"array","items":{"type":"object","maxProperties":128,"additionalProperties":true},"maxItems":256,"description":"Items supplied to JSON Array Index By Key; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"index":{"\"a\"":{"id":"a","value":1},"\"b\"":{"id":"b","value":2}},"duplicate_keys":[]},"schema":"delx/util-json-array-index-by-key/v1","status":"pass","evidence":{"retained":false,"input_sha256":"3ba5729409fe1785540d75284648b16e6e90027012b970c2a4b84dc9207b7c6b","external_calls":0},"operation":"data_batch:json_array_index_by_key"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_B-3hjwPYWg954E_aCM2IT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Indexes an array of JSON objects by a specified top-level key, returning a keyed map with duplicate detection and counts","exampleAgentPrompt":"Index this array of product objects by their 'sku' field and tell me if there are any duplicate SKUs — here's the list: [{\"sku\":\"A1\",\"name\":\"Widget\"},{\"sku\":\"B2\",\"name\":\"Gadget\"},{\"sku\":\"A1\",\"name\":\"WidgetDupe\"}].","exampleUseCases":[{"title":"Pre-flight dedup check before DB upsert","prompt":"Before I write these 150 user records to the database, index them by 'user_id' and flag any duplicates so I don't get constraint violations."},{"title":"Build lookup table from API batch response","prompt":"I've got an array of order objects from the orders API — can you index them all by 'order_id' so I can do fast lookups instead of scanning the whole list every time?"},{"title":"Validate uniqueness before downstream tool handoff","prompt":"I'm about to pass this batch of config entries to the deployment tool, but it needs them keyed by 'config_name' with no duplicates — can you reindex them and tell me if anything collides?"}],"resultDescription":"Returns a versioned deterministic JSON object containing: a map of objects keyed by the specified field, duplicate key counts and which entries collided, normalized values, and metadata including a versioned result contract. The transformation is computed in-memory with no data retention.","failureModes":["Key field not present in all objects — returns error or partial index with missing-key report","Duplicate items exceeding expected uniqueness — reported in duplicate count but not an error","Input array exceeds 256 items — request rejected with validation error","Key string exceeds 8192 characters — rejected with schema validation error","Malformed JSON body — returns 400-level parse error","Objects with more than 128 properties — rejected per schema constraint"],"whenToPreferThis":"Use this endpoint when you need to convert a flat JSON array into a keyed lookup map before handing data to a downstream tool that requires a dictionary structure, or when you need to detect and report duplicate keys in a bounded dataset. It is deterministic, stateless, and cheap ($0.001 USDC) making it ideal as a preprocessing step in agentic pipelines. Prefer it over custom agent-side code when you want a versioned, auditable transformation contract rather than an ad-hoc implementation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:17:45.582Z","isFirstParty":false}