@classmethod
    def get_aggregations_fields(cls, params):
        fields = []
        for key, val in params.items():
            if isinstance(val, dict):
                fields += cls.get_aggregations_fields(val)
            if key == 'field':
                fields.append(val)
        return fields
Recursively get values under the 'field' key.
dataset/ETHPy150Open ramses-tech/nefertari/nefertari/view_helpers.py/ESAggregator.get_aggregations_fields