This isn’t exactly what you are doing, but @LostKobrakai has a post on using unnest for sorting that you might want to check out and see if it unblocks you.
This isn’t exactly what you are doing, but @LostKobrakai has a post on using unnest for sorting that you might want to check out and see if it unblocks you.