{"uid":"cap_9GHjYkVVeObOW0uTOKivR","slug":"json-array-sort-by-key-b7024b1e","name":"JSON Array Sort By Key","description":"JSON Array Sort By Key: JSON Array Sort By Key sorts object rows by a selected top-level key from bounded caller-supplied values without an external provider. Call JSON Array Sort 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 Sort By Key as versioned deterministic JSON. Price: $0.001 USDC via x402 on…","url":"https://api.delx.ai/api/v1/x402/json-array-sort-by-key","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","maxLength":8192,"description":"Key supplied to JSON Array Sort 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 Sort By Key; used only for this bounded calculation and processed in memory without retention."},"descending":{"type":"boolean","description":"Descending supplied to JSON Array Sort By Key; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"key":"id","items":[{"id":1},{"id":2}]},"schema":"delx/util-json-array-sort-by-key/v1","status":"pass","evidence":{"retained":false,"input_sha256":"bf681df4606cba8b0ec23d87bda8e34c27fbf446a8b5b0d57f064b3afa47afd5","external_calls":0},"operation":"data_batch:json_array_sort_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_CuyEmlGjHJ_iqB6T0N6mo","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":"Sorts an array of JSON objects by a specified top-level key, ascending or descending, returning the reordered array with counts and a versioned result contract.","exampleAgentPrompt":"Sort this list of product objects by the 'price' key in descending order: [{\"name\":\"Widget\",\"price\":12},{\"name\":\"Gadget\",\"price\":7},{\"name\":\"Doohickey\",\"price\":25}].","exampleUseCases":[{"title":"Sort leaderboard by score descending","prompt":"I have a leaderboard as a JSON array of player objects — sort them by 'score' descending so I can display the top players first: [{\"player\":\"Alice\",\"score\":340},{\"player\":\"Bob\",\"score\":512},{\"player\":\"Carol\",\"score\":275}]."},{"title":"Order product catalog by price","prompt":"Sort this product catalog by the 'price' field ascending before I pass it to my checkout tool: [{\"id\":1,\"name\":\"Mug\",\"price\":9.99},{\"id\":2,\"name\":\"Notebook\",\"price\":4.49},{\"id\":3,\"name\":\"Pen\",\"price\":1.99}]."},{"title":"Rank agent tasks by priority","prompt":"I've got a list of agent tasks with a 'priority' field — can you sort them descending by 'priority' so the most urgent ones are at the top before I hand them off to the executor?"}],"resultDescription":"Returns the sorted JSON array of objects ordered by the specified top-level key (ascending or descending), along with item counts, normalized values, and a versioned deterministic result contract. The transformation is computed in-memory without data retention.","failureModes":["Key not found in one or more objects — items with missing key may sort inconsistently or return an error","Array exceeds 256 items — request rejected with validation error","Object contains more than 128 properties — may be rejected","Non-comparable mixed types under the sort key (e.g. string vs number) — may produce undefined ordering or error","Malformed JSON array input — request rejected","Payment failure via x402 — request not processed"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, in-memory, serverless sort of a JSON array by a top-level object key without standing up any infrastructure or writing code. It is ideal for pre-processing structured data before handing it to a downstream tool with a strict ordering contract. Prefer it over writing a sort routine in an agent's code execution step when you want a clean, versioned, auditable result contract. Not suitable for nested-key sorting, arrays larger than 256 items, or complex multi-key sort requirements.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:05:55.046Z","isFirstParty":false}