Iterate through routes and sub_routes to create formated nested hash data