Implement the trimNested() feature

cc @sh1mmer