to_object
No overview available.
def to_object(
data: dict|list,
target_class: type
) - > object|list
Converts a dictionary or a list of dictionaries into a single object or a list of objects by mapping keys to attributes.
Parameters
| Name | Type | Description |
|---|---|---|
| data | `dict | list` |
| target_class | type | The class type that the data should be instantiated into. |
Returns
| Type | Description |
|---|---|
| `object | list` |