{"id":"json-array-index-by","version":"1.0.0","description":"Convert an array of objects into a single object indexed by a specific key.","supported_operations":["json array index by","index json array by key","convert array to map by key"],"unsupported_operations":["multiple keys","deep indexing"],"semantics":["Creates a single JSON object where keys are the stringified values of the specified index field.","If multiple objects have the same key, the behavior is determined by on_duplicate (\"last\", \"first\", or \"throw\").","Result keys are ordered by first appearance.","Missing or null keys are treated as the string \"undefined\" or \"null\"."],"limits":{"max_array_items":10000,"max_output_items":10000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["array","key"],"properties":{"array":{"type":"array","maxItems":10000,"items":{"type":"object"}},"key":{"type":"string","minLength":1},"on_duplicate":{"type":"string","enum":["last","first","throw"],"default":"last"}}},"output_schema":{"type":"object","additionalProperties":false,"required":["result","count"],"properties":{"result":{"type":"object"},"count":{"type":"integer"}}},"examples":[{"input":{"array":[{"id":"a","val":1},{"id":"b","val":2},{"id":"a","val":3}],"key":"id","on_duplicate":"last"},"output":{"result":{"a":{"id":"a","val":3},"b":{"id":"b","val":2}},"count":2}}],"execute_url":"/v1/tools/json-array-index-by/versions/1.0.0/execute"}