[Bug? Feature Request?] Sorting FindSession Results

Ok, I get FindSession results and put them into a nifty UI listing the available games.

But I want to sort them.

Am I missing something obviuous?

Approach #1: Wirte some C++ to sort a TArray
Problem: FOnlineSessionSearchResult is not a public struct in “OnlineSessionSettings.h”
So it can’t be passed in and sorted easily.

Approach #2: Sort the Array in my blueprint.
Problem: This is rather complex, and there is no string compare for greater than or less than, only Equals is available.
I can implement that.

Approach #3: Make the widget lines and fill, then sort in the widget instead, based on just string of fields.
That can work too but again requires rather complex blueprint code. (Almost the same problem as #2)

Approach #4: Make a C++ sort on the resulting arrya of string for the widget.
Problem: Requires a lot of memory thrashing of string arrays to and from the underlying C++ sorter.

Why is this difficult?

What have I missed here?

There probably is not a built-in way of sorting them by name because that’s a pretty rare use-case.

I don’t ever recall seeing a game sort a list of available sessions by alphabetical order or any name-related order besides map name, usually it’s by ping or player count.

If you want to sort by map name that should not be that complex to do in BP unless you have a large number of maps.

How exactly are you trying to sort them?