I’m trying to merge two query sources (some entries and some categories) but have them ordered by a shared field that is a date field. Here’s what I have so far:
set classesLocations = craft.entries.section('classes')|merge(craft.categories.group('locations'))`
I can group by the field of course, but not sure that helps me with ordering.
When I try to use .order('startTime')
on the merged object I of course get an error, as they have already been automatically converted to an array to perform the merge rather than remaining as objects. And of course doing the order on both set of objects first doesn’t help, because the merge just tacks the merge on to the end.