get_record_list_data
Extracts the field data from a list of Record instances and returns it as a list of dictionaries. Each dictionary contains the field-value pairs from a single record.
Syntax
get_record_list_data(record_list)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| record_list | list[Record] | Yes | A list of Record instances to extract data from. |
Returns
Type: list[dict]
A list of dictionaries, where each dictionary contains the field names and values from the corresponding record.
Examples
Convert records to raw data for further processing:
get_record_list_data([extracted_records])
If extracted_records contains three Record instances, the result is a list of three dictionaries, each containing the record's field-value pairs.
Access specific fields after extraction:
get_record_list_data([user_records])
Might return: [{"name": "Alice", "role": "Admin"}, {"name": "Bob", "role": "User"}].
Notes
- This function is useful when you need to work with record data as plain dictionaries rather than Record objects.
- The returned dictionaries contain all fields present on each record.
- The order of records in the output matches the order of the input list.
Comments
0 comments
Please sign in to leave a comment.