Thank you in advance. First of all, I`ll try to explain my problem. I have a history of users (array) and many days in this history (also arrays) and every day has users (objects) which I take from get query. It turns out such a structure: [ [ {} ,{},{},{} ], [ {},{},{} ], [ {},{},{} ] ]. My goal: I want to show unique top users (every user has own unique ID during all history), sorting users by score. I have already have filtering unique (by id) top (by score) users (first image) and I also have sorting users by score (second image)
But I can't combine these two functions into one logic.I'd be very grateful to someone who can solve it


