set sort_key for nested arrays as well