Order by nested structure date field

I have structure fields inside of a structure field and I’d like to know if it’s possible to order my data by a structure field that’s nested. My blueprint is like this:

   alldates:
    type: structure
    label: All dates
    fields:        
      autoid:
        type: hidden
        translate: false
      singledates:
        label: Dates
        type: structure
        fields:
          startdate:
            type: date
            label: Start date
          enddate:
            type: date
            label: End date
      starttime:
        label: Start time
        type: time
        notation: 24
        width: 1/3
      endtime:
        label: End time
        type: time
        notation: 24
        width: 1/3

Basically I’d like to display these start/end dates and order them by the start date. Is that possible somehow?

If I get you right and if you don’t just want to order the nested items within each parent item, but really sort all items, I think you would have to create a new flat Structure from what you have and then sort that.

Indeed not within each parent item but all of them. Can you give me any indication what would that flat structure code look like?

Basically, you would run through all alldates items and through all single dates and add them as new items to a new Structure().