bmel:json-flatten¶
Category: JSON · Returns: bmel:string
bmel:json-flatten(object: bmel:any)
Description¶
Serializes a nested JSON object into a compact, single-level JSON string using dot-notation keys. Array elements are indexed as key.0, key.1, … . Returns '{}' when the input is null or an empty object.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
object | bmel:any | ✅ | The JSON object (or any value) to flatten. Nested objects and arrays are recursively traversed. |
Example¶
bmel:json-flatten({chat:Response Payload}.$.usage)