I have this structure inside an array:
[
    {
        "playerName": "Stack",
        "leaguePoints": 100,
        "wins": 280,
        "miniSeries": {
            "progress": "WNN",
            "losses": 0,
            "wins": 1
        }
    },
    {
        "playerName": "Overflow",
        "leaguePoints": 90,
        "wins": 280
    }
    {
        "playerName": "StackOverflow",
        "leaguePoints": 0,
        "wins": 100
    }
]
I need to sort the array elements like this:
If leaguePoints = 100 then sort by (miniSeries.wins+miniSeries.losses (more games played, higher in rank)) or number of N(eutral) left in miniSeries.progress (less Ns left, higher in rank)
If leaguePoints < 100 then sort by leaguePoints
If leaguePoints = 0 then sort by wins
I've been using Ege Özcan's multiple parameters sort and it does sort by leaguePoints and wins, but I can't get it to work with the miniSeries.
How it should end up looking like:
Name    leaguePoints    Wins    MiniSeries
Stack   100             10      LWN
Stack   100             25      WNN
Stack   100             5       NNN
Stack   99              50      ---
Stack   70              250     ---
Stack   0               300     ---
Stack   0               200     ---
Stack   0               100     ---
 
     
     
    