yfpy.utils.reformat_json_list

reformat_json_list(json_obj)[source]

Function to clean and reformat JSON lists to eliminate empty values and unnecessarily nested lists.

Parameters:

json_obj (Any) – JSON object (typically a dictionary or list, but can also be a primitive) to be cleaned.

Returns:

Reformatted JSON list derived from original JSON object.

Return type:

Any