Yes I tried, but I get only the first level of fields. I think there is another loop needed if a field is of type group that iterates trough the subfields. But I’m not sure how to achieve this.
Great solution. Would this also be possible for subfields of a group field?