Always use an array for sorting. Objects do not have a defined order of fields so you in general do not know if `local` will be before `createdAt` or vice versa.