pub fn flatten_object(object: Value, max_nested_levels: usize) -> Result<Value>
Expand description
Consumes the JSON object and consumes it into a single-level object.
The max_nested_levels
parameter is used to limit how deep to flatten nested JSON objects.
When the maximum level is reached, the remaining nested structure is serialized to a JSON
string and stored at the current flattened key.