vantage6.client.filter.filter_dicts_keys#
- filter_dicts_keys(dict_, keys)#
Filter a list of dicts on the specified keys. If no keys are given, the original list of dicts is returned.
- Parameters:
dicts (list[dict]) – The dict to filter. This is a dict with a ‘data’ key that contains the list of data dictionaries that will be filtered.
keys (list[str]) – A list of keys to keep in the dictionaries
- Returns:
The filtered list of dicts.
- Return type:
list[dict]