Interview Guides
Given a Python object parsed from JSON, write a function that flattens it into a list of row dictionaries. Nested objects should be flattened using dot-separated keys, and arrays should be expanded by index using bracket notation such as items[0].id. If the input is a single object, return one flattened row; if it is a list of objects, return one flattened row per object.
1 <= number of top-level records <= 10^42 * 10^5null