Flatten Nested JSON
Converts deeply nested objects into a single-level list of key-value pairs.
Supports dot notation (parent.child.key) and array indexing (array[0]) for precise mapping.
parent.child.key
array[0]
Array Handling
Processes arrays seamlessly, creating keys that represent the index of each element.
Nested arrays and objects are recursively flattened.
Base64 Binary Detection
Automatically detects string values that are Base64-encoded, flagging them as binary.
Useful for safely handling file attachments, images, or encoded payloads.
Dynamic and Type-Safe
Works with unknown or dynamic JSON structures.
Preserves data types for primitives: string, number, boolean, null.
Developer-Friendly
Lightweight and efficient JavaScript implementation.
Provides a clean, reusable pattern for any JSON manipulation scenario.
Input:
{
"id": 123,
"owner": {
"firstName": "John",
"lastName": "Doe"
},
"attachments": [
{ "fileName": "invoice.pdf", "contentBase64": "JVBERi0xLjMK..." }
]
}
Output:
[
{ "Key": "id", "Value": 123 },
{ "Key": "owner.firstName", "Value": "John" },
{ "Key": "owner.lastName", "Value": "Doe" },
{ "Key": "attachments[0].fileName", "Value": "invoice.pdf" },
{ "Key": "attachments[0].contentBase64", "Value": "JVBERi0xLjMK...", "IsBinary": true }