Group fields hierarchically