yfpy.utils.flatten_to_list
- flatten_to_list(json_obj)[source]
Function to flatten JSON dictionaries with unnecessary keys to a list of objects.
- Parameters:
json_obj (Any) – JSON object (typically a dictionary or list, but can also be a primitive).
- Returns:
A list made from a flattened dictionary if json_obj was a dictionary, the original list if json_obj was a list, or the original value if json_obj was a primitive.
- Return type: