{"uid":"cap_6LUpQs8ZNkHLDxP7UI3z2","slug":"json-flatten-ec31cdea","name":"JSON Flatten","description":"opentools utility endpoint","url":"https://chargers-borders-cedar-fig.trycloudflare.com/tools/json-flatten","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"unprobed","priceSource":"registry","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":"unknown","summary":"price unknown","primary":{"kind":"unknown","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"unknown","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_AJM6NdK8v8QVOlsIoBfFX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7c32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Flattens a nested JSON object into a single-level key-value structure","exampleAgentPrompt":"Can you flatten this nested JSON object into a single-level key-value structure for me? Here's the object: {\"user\":{\"name\":\"Alice\",\"address\":{\"city\":\"Boston\",\"zip\":\"02101\"}},\"score\":42}","exampleUseCases":[{"title":"Flatten API response for spreadsheet import","prompt":"I got this nested JSON response from an API and I need it flattened into a single level so I can import it into a spreadsheet — can you flatten it? {\"product\":{\"id\":101,\"details\":{\"name\":\"Widget\",\"price\":9.99}},\"stock\":50}"},{"title":"Normalize config object for database storage","prompt":"I have a deeply nested config JSON that I need to store in a flat key-value database. Can you flatten it for me? {\"app\":{\"settings\":{\"theme\":\"dark\",\"lang\":\"en\"},\"version\":\"2.1\"}}"},{"title":"Simplify nested event payload for logging","prompt":"Take this nested event payload and flatten it into a simple single-level JSON so it's easier to log: {\"event\":{\"type\":\"click\",\"meta\":{\"page\":\"home\",\"ts\":1713200000}},\"userId\":\"u_99\"}"}],"resultDescription":"A flattened JSON object where all nested keys are collapsed into a single level, typically using dot-notation or underscore-separated composite keys to represent the original hierarchy.","failureModes":["Missing required 'input' field returns a validation error","Input body is not a valid JSON object","Circular references in the JSON may cause processing errors","Empty object input returns an empty flattened object","Deeply nested or very large objects may time out or return an error"],"whenToPreferThis":"Use this endpoint when you need to transform a nested or hierarchical JSON object into a flat, single-level key-value map — especially useful before importing data into spreadsheets, flat databases, logging systems, or any system that doesn't support nested structures.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:33:39.507Z","isFirstParty":false}