let data = {
    "bullet": [
        {
            "id": "alireza2003",
            "username": "alireza2003",
            "perfs": {
                "bullet": {
                    "rating": 3380,
                    "progress": 21
                }
            },
            "title": "GM"
        },
        {
            "id": "penguingim1",
            "username": "penguingim1",
            "perfs": {
                "bullet": {
                    "rating": 3251,
                    "progress": -4
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "night-king96",
            "username": "Night-King96",
            "perfs": {
                "bullet": {
                    "rating": 3204,
                    "progress": 12
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "arm-777777",
            "username": "ARM-777777",
            "perfs": {
                "bullet": {
                    "rating": 3150,
                    "progress": 19
                }
            },
            "title": "GM"
        },
        {
            "id": "mutdpro",
            "username": "mutdpro",
            "perfs": {
                "bullet": {
                    "rating": 3112,
                    "progress": 10
                }
            },
            "title": "GM"
        },
        {
            "id": "svodmevko",
            "username": "SVODMEVKO",
            "perfs": {
                "bullet": {
                    "rating": 3111,
                    "progress": -1
                }
            },
            "title": "GM"
        },
        {
            "id": "rebeccaharris",
            "username": "RebeccaHarris",
            "perfs": {
                "bullet": {
                    "rating": 3104,
                    "progress": 11
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "muisback",
            "username": "muisback",
            "perfs": {
                "bullet": {
                    "rating": 3088,
                    "progress": 4
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "italianchessstar",
            "username": "Italianchessstar",
            "perfs": {
                "bullet": {
                    "rating": 3083,
                    "progress": 39
                }
            }
        },
        {
            "id": "a-liang",
            "username": "A-Liang",
            "perfs": {
                "bullet": {
                    "rating": 3081,
                    "progress": -2
                }
            }
        }
    ],
    "blitz": [
        {
            "id": "jepetto",
            "username": "Jepetto",
            "perfs": {
                "blitz": {
                    "rating": 3030,
                    "progress": -10
                }
            },
            "title": "GM"
        },
        {
            "id": "may6enexttime",
            "username": "may6enexttime",
            "perfs": {
                "blitz": {
                    "rating": 3020,
                    "progress": -8
                }
            },
            "title": "GM"
        },
        {
            "id": "aspiringstar",
            "username": "aspiringstar",
            "perfs": {
                "blitz": {
                    "rating": 3018,
                    "progress": 25
                }
            },
            "title": "GM"
        },
        {
            "id": "papertiger2022",
            "username": "papertiger2022",
            "perfs": {
                "blitz": {
                    "rating": 3004,
                    "progress": 18
                }
            }
        },
        {
            "id": "yarebore",
            "username": "Yarebore",
            "perfs": {
                "blitz": {
                    "rating": 3002,
                    "progress": 34
                }
            },
            "title": "IM"
        },
        {
            "id": "majestyofswords",
            "username": "MajestyOfSwords",
            "perfs": {
                "blitz": {
                    "rating": 2986,
                    "progress": 8
                }
            }
        },
        {
            "id": "arseniii_nesterov",
            "username": "Arseniii_Nesterov",
            "perfs": {
                "blitz": {
                    "rating": 2969,
                    "progress": 34
                }
            },
            "title": "GM"
        },
        {
            "id": "rebeccaharris",
            "username": "RebeccaHarris",
            "perfs": {
                "blitz": {
                    "rating": 2969,
                    "progress": -9
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "a-liang",
            "username": "A-Liang",
            "perfs": {
                "blitz": {
                    "rating": 2967,
                    "progress": 10
                }
            }
        },
        {
            "id": "avs2000",
            "username": "AVS2000",
            "perfs": {
                "blitz": {
                    "rating": 2959,
                    "progress": -11
                }
            },
            "title": "GM"
        }
    ],
    "rapid": [
        {
            "id": "drvitman",
            "username": "Drvitman",
            "perfs": {
                "rapid": {
                    "rating": 3028,
                    "progress": -23
                }
            },
            "title": "GM"
        },
        {
            "id": "durarbayli",
            "username": "Durarbayli",
            "perfs": {
                "rapid": {
                    "rating": 2917,
                    "progress": 7
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "realdavidnavara",
            "username": "RealDavidNavara",
            "perfs": {
                "rapid": {
                    "rating": 2911,
                    "progress": -37
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "drawdenied_twitch",
            "username": "DrawDenied_Twitch",
            "perfs": {
                "rapid": {
                    "rating": 2900,
                    "progress": 12
                }
            },
            "title": "GM"
        },
        {
            "id": "rakhmanov_aleksandr",
            "username": "Rakhmanov_Aleksandr",
            "perfs": {
                "rapid": {
                    "rating": 2897,
                    "progress": 9
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "ragadingdong",
            "username": "Ragadingdong",
            "perfs": {
                "rapid": {
                    "rating": 2845,
                    "progress": 9
                }
            }
        },
        {
            "id": "aborigen100500",
            "username": "Aborigen100500",
            "perfs": {
                "rapid": {
                    "rating": 2800,
                    "progress": 2
                }
            },
            "title": "NM"
        },
        {
            "id": "lance5500",
            "username": "Lance5500",
            "perfs": {
                "rapid": {
                    "rating": 2771,
                    "progress": 67
                }
            },
            "title": "LM",
            "patron": true
        },
        {
            "id": "arm__55555",
            "username": "ARM__55555",
            "perfs": {
                "rapid": {
                    "rating": 2769,
                    "progress": 18
                }
            },
            "title": "FM"
        },
        {
            "id": "calcu_later",
            "username": "calcu_later",
            "perfs": {
                "rapid": {
                    "rating": 2756,
                    "progress": 7
                }
            },
            "title": "FM"
        }
    ],
    "classical": [
        {
            "id": "degrande",
            "username": "DeGrande",
            "perfs": {
                "classical": {
                    "rating": 2626,
                    "progress": 7
                }
            },
            "title": "FM"
        },
        {
            "id": "unkreativ3",
            "username": "Unkreativ3",
            "perfs": {
                "classical": {
                    "rating": 2569,
                    "progress": -2
                }
            },
            "title": "FM",
            "patron": true
        },
        {
            "id": "ak_nz",
            "username": "AK_NZ",
            "perfs": {
                "classical": {
                    "rating": 2551,
                    "progress": 30
                }
            }
        },
        {
            "id": "mikolka1985",
            "username": "mikolka1985",
            "perfs": {
                "classical": {
                    "rating": 2541,
                    "progress": -24
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "lance5500",
            "username": "Lance5500",
            "perfs": {
                "classical": {
                    "rating": 2538,
                    "progress": 32
                }
            },
            "title": "LM",
            "patron": true
        },
        {
            "id": "lord-universe31",
            "username": "Lord-Universe31",
            "perfs": {
                "classical": {
                    "rating": 2494,
                    "progress": 7
                }
            }
        },
        {
            "id": "superbchessplayer",
            "username": "SuperbChessPlayer",
            "perfs": {
                "classical": {
                    "rating": 2471,
                    "progress": -10
                }
            }
        },
        {
            "id": "alexshirov",
            "username": "Alexshirov",
            "perfs": {
                "classical": {
                    "rating": 2469,
                    "progress": 44
                }
            }
        },
        {
            "id": "verbavolant",
            "username": "VerbaVolant",
            "perfs": {
                "classical": {
                    "rating": 2469,
                    "progress": 37
                }
            }
        },
        {
            "id": "billiejoe",
            "username": "BillieJoe",
            "perfs": {
                "classical": {
                    "rating": 2456,
                    "progress": -29
                }
            },
            "title": "FM"
        }
    ],
    "ultraBullet": [
        {
            "id": "penguingim1",
            "username": "penguingim1",
            "perfs": {
                "ultraBullet": {
                    "rating": 2653,
                    "progress": 3
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "aaryan_varshney",
            "username": "aaryan_varshney",
            "perfs": {
                "ultraBullet": {
                    "rating": 2629,
                    "progress": 20
                }
            },
            "title": "FM",
            "patron": true
        },
        {
            "id": "fritzi_2003",
            "username": "Fritzi_2003",
            "perfs": {
                "ultraBullet": {
                    "rating": 2571,
                    "progress": 9
                }
            },
            "patron": true
        },
        {
            "id": "blazinq",
            "username": "Blazinq",
            "perfs": {
                "ultraBullet": {
                    "rating": 2570,
                    "progress": 20
                }
            },
            "title": "FM"
        },
        {
            "id": "think_fast_move_fast",
            "username": "Think_Fast_Move_Fast",
            "perfs": {
                "ultraBullet": {
                    "rating": 2535,
                    "progress": 25
                }
            },
            "title": "FM"
        },
        {
            "id": "inventing_invention",
            "username": "Inventing_Invention",
            "perfs": {
                "ultraBullet": {
                    "rating": 2528,
                    "progress": -10
                }
            },
            "title": "GM"
        },
        {
            "id": "iliketowin69",
            "username": "iliketowin69",
            "perfs": {
                "ultraBullet": {
                    "rating": 2465,
                    "progress": 18
                }
            }
        },
        {
            "id": "zhigalko_sergei",
            "username": "Zhigalko_Sergei",
            "perfs": {
                "ultraBullet": {
                    "rating": 2463,
                    "progress": 15
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "the-one-below-all",
            "username": "The-One-Below-All",
            "perfs": {
                "ultraBullet": {
                    "rating": 2453,
                    "progress": -2
                }
            }
        },
        {
            "id": "elegraamagetto91",
            "username": "EleGraAMagetto91",
            "perfs": {
                "ultraBullet": {
                    "rating": 2450,
                    "progress": -17
                }
            }
        }
    ],
    "crazyhouse": [
        {
            "id": "catask",
            "username": "catask",
            "perfs": {
                "crazyhouse": {
                    "rating": 2924,
                    "progress": 14
                }
            }
        },
        {
            "id": "blitzbullet",
            "username": "blitzbullet",
            "perfs": {
                "crazyhouse": {
                    "rating": 2763,
                    "progress": -12
                }
            },
            "title": "NM",
            "patron": true
        },
        {
            "id": "littleplotkin",
            "username": "littleplotkin",
            "perfs": {
                "crazyhouse": {
                    "rating": 2687,
                    "progress": -3
                }
            },
            "title": "IM"
        },
        {
            "id": "mugwort",
            "username": "Mugwort",
            "perfs": {
                "crazyhouse": {
                    "rating": 2663,
                    "progress": 12
                }
            },
            "patron": true
        },
        {
            "id": "grxbullet",
            "username": "GRXbullet",
            "perfs": {
                "crazyhouse": {
                    "rating": 2634,
                    "progress": -4
                }
            },
            "patron": true
        },
        {
            "id": "oldhas-been",
            "username": "OldHas-Been",
            "perfs": {
                "crazyhouse": {
                    "rating": 2612,
                    "progress": 11
                }
            },
            "patron": true
        },
        {
            "id": "greeen_beast",
            "username": "greeen_beast",
            "perfs": {
                "crazyhouse": {
                    "rating": 2588,
                    "progress": 16
                }
            }
        },
        {
            "id": "crazy_eight",
            "username": "Crazy_Eight",
            "perfs": {
                "crazyhouse": {
                    "rating": 2583,
                    "progress": -43
                }
            },
            "title": "FM"
        },
        {
            "id": "sportsfanatic",
            "username": "SportsFanatic",
            "perfs": {
                "crazyhouse": {
                    "rating": 2579,
                    "progress": 11
                }
            }
        },
        {
            "id": "mulder00",
            "username": "mulder00",
            "perfs": {
                "crazyhouse": {
                    "rating": 2575,
                    "progress": 1
                }
            }
        }
    ],
    "chess960": [
        {
            "id": "zhigalko_sergei",
            "username": "Zhigalko_Sergei",
            "perfs": {
                "chess960": {
                    "rating": 2741,
                    "progress": 12
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "heisenberg01",
            "username": "Heisenberg01",
            "perfs": {
                "chess960": {
                    "rating": 2640,
                    "progress": 15
                }
            },
            "title": "FM"
        },
        {
            "id": "degrande",
            "username": "DeGrande",
            "perfs": {
                "chess960": {
                    "rating": 2632,
                    "progress": -7
                }
            },
            "title": "FM"
        },
        {
            "id": "fritzi_2003",
            "username": "Fritzi_2003",
            "perfs": {
                "chess960": {
                    "rating": 2631,
                    "progress": 6
                }
            },
            "patron": true
        },
        {
            "id": "realdavidnavara",
            "username": "RealDavidNavara",
            "perfs": {
                "chess960": {
                    "rating": 2605,
                    "progress": 2
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "cheerychocolate",
            "username": "CheeryChocolate",
            "perfs": {
                "chess960": {
                    "rating": 2580,
                    "progress": -10
                }
            }
        },
        {
            "id": "ragadingdong",
            "username": "Ragadingdong",
            "perfs": {
                "chess960": {
                    "rating": 2574,
                    "progress": 6
                }
            }
        },
        {
            "id": "uncatchable_j0e",
            "username": "uncatchable_j0e",
            "perfs": {
                "chess960": {
                    "rating": 2560,
                    "progress": -9
                }
            }
        },
        {
            "id": "neverenough",
            "username": "NeverEnough",
            "perfs": {
                "chess960": {
                    "rating": 2546,
                    "progress": -4
                }
            },
            "title": "GM"
        },
        {
            "id": "ragehunter",
            "username": "Ragehunter",
            "perfs": {
                "chess960": {
                    "rating": 2541,
                    "progress": -40
                }
            },
            "title": "FM"
        }
    ],
    "kingOfTheHill": [
        {
            "id": "zhigalko_sergei",
            "username": "Zhigalko_Sergei",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2621,
                    "progress": 22
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "homayooont",
            "username": "HomayooonT",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2543,
                    "progress": 37
                }
            },
            "title": "GM"
        },
        {
            "id": "arm__55555",
            "username": "ARM__55555",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2538,
                    "progress": 52
                }
            },
            "title": "FM"
        },
        {
            "id": "littleplotkin",
            "username": "littleplotkin",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2517,
                    "progress": 5
                }
            },
            "title": "IM"
        },
        {
            "id": "cheerychocolate",
            "username": "CheeryChocolate",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2515,
                    "progress": 29
                }
            }
        },
        {
            "id": "ragehunter",
            "username": "Ragehunter",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2499,
                    "progress": 12
                }
            },
            "title": "FM"
        },
        {
            "id": "ragadingdong",
            "username": "Ragadingdong",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2489,
                    "progress": 5
                }
            }
        },
        {
            "id": "aqua_blazing",
            "username": "Aqua_Blazing",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2472,
                    "progress": -47
                }
            }
        },
        {
            "id": "andrey11976",
            "username": "Andrey11976",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2450,
                    "progress": 31
                }
            }
        },
        {
            "id": "catask",
            "username": "catask",
            "perfs": {
                "kingOfTheHill": {
                    "rating": 2441,
                    "progress": 29
                }
            }
        }
    ],
    "threeCheck": [
        {
            "id": "zhigalko_sergei",
            "username": "Zhigalko_Sergei",
            "perfs": {
                "threeCheck": {
                    "rating": 2610,
                    "progress": 3
                }
            },
            "title": "GM",
            "patron": true
        },
        {
            "id": "variantsonly",
            "username": "VariantsOnly",
            "perfs": {
                "threeCheck": {
                    "rating": 2529,
                    "progress": 16
                }
            },
            "patron": true
        },
        {
            "id": "cheerychocolate",
            "username": "CheeryChocolate",
            "perfs": {
                "threeCheck": {
                    "rating": 2515,
                    "progress": 12
                }
            }
        },
        {
            "id": "niccless",
            "username": "Niccless",
            "perfs": {
                "threeCheck": {
                    "rating": 2509,
                    "progress": 39
                }
            },
            "title": "FM"
        },
        {
            "id": "mulder00",
            "username": "mulder00",
            "perfs": {
                "threeCheck": {
                    "rating": 2480,
                    "progress": 19
                }
            }
        },
        {
            "id": "littleplotkin",
            "username": "littleplotkin",
            "perfs": {
                "threeCheck": {
                    "rating": 2464,
                    "progress": 10
                }
            },
            "title": "IM"
        },
        {
            "id": "neverenough",
            "username": "NeverEnough",
            "perfs": {
                "threeCheck": {
                    "rating": 2457,
                    "progress": -60
                }
            },
            "title": "GM"
        },
        {
            "id": "zu_cho_chi",
            "username": "Zu_Cho_Chi",
            "perfs": {
                "threeCheck": {
                    "rating": 2429,
                    "progress": -17
                }
            }
        },
        {
            "id": "lyxxj",
            "username": "lyxxj",
            "perfs": {
                "threeCheck": {
                    "rating": 2406,
                    "progress": 17
                }
            }
        },
        {
            "id": "ragadingdong",
            "username": "Ragadingdong",
            "perfs": {
                "threeCheck": {
                    "rating": 2403,
                    "progress": 31
                }
            }
        }
    ],
    "antichess": [
        {
            "id": "abbysunterra",
            "username": "AbbySunterra",
            "perfs": {
                "antichess": {
                    "rating": 2414,
                    "progress": 26
                }
            },
            "online": true
        },
        {
            "id": "changeopening",
            "username": "ChangeOpening",
            "perfs": {
                "antichess": {
                    "rating": 2389,
                    "progress": 19
                }
            },
            "patron": true,
            "online": true
        },
        {
            "id": "sudenurk2",
            "username": "sudenurk2",
            "perfs": {
                "antichess": {
                    "rating": 2366,
                    "progress": 17
                }
            }
        },
        {
            "id": "allegro_moon",
            "username": "Allegro_Moon",
            "perfs": {
                "antichess": {
                    "rating": 2357,
                    "progress": -8
                }
            }
        },
        {
            "id": "tolius",
            "username": "tolius",
            "perfs": {
                "antichess": {
                    "rating": 2332,
                    "progress": 12
                }
            },
            "patron": true
        },
        {
            "id": "onefortheages",
            "username": "OneForTheAges",
            "perfs": {
                "antichess": {
                    "rating": 2332,
                    "progress": -8
                }
            },
            "online": true
        },
        {
            "id": "arda-isgor",
            "username": "arda-isgor",
            "perfs": {
                "antichess": {
                    "rating": 2324,
                    "progress": 26
                }
            }
        },
        {
            "id": "pepsingaming",
            "username": "PepsiNGaming",
            "perfs": {
                "antichess": {
                    "rating": 2321,
                    "progress": 9
                }
            },
            "patron": true
        },
        {
            "id": "iithearunii",
            "username": "IiTheAruNiI",
            "perfs": {
                "antichess": {
                    "rating": 2313,
                    "progress": 9
                }
            }
        },
        {
            "id": "tetiksh1agrawal",
            "username": "Tetiksh1Agrawal",
            "perfs": {
                "antichess": {
                    "rating": 2308,
                    "progress": -16
                }
            }
        }
    ],
    "atomic": [
        {
            "id": "sutcunuri",
            "username": "sutcunuri",
            "perfs": {
                "atomic": {
                    "rating": 2461,
                    "progress": 7
                }
            },
            "title": "CM"
        },
        {
            "id": "fast-tsunami",
            "username": "fast-tsunami",
            "perfs": {
                "atomic": {
                    "rating": 2414,
                    "progress": 7
                }
            },
            "title": "LM",
            "patron": true
        },
        {
            "id": "jakestatefarm",
            "username": "JakeStateFarm",
            "perfs": {
                "atomic": {
                    "rating": 2400,
                    "progress": -6
                }
            }
        },
        {
            "id": "pashpash",
            "username": "pashpash",
            "perfs": {
                "atomic": {
                    "rating": 2388,
                    "progress": 11
                }
            },
            "title": "NM"
        },
        {
            "id": "chrisrapid",
            "username": "chrisrapid",
            "perfs": {
                "atomic": {
                    "rating": 2344,
                    "progress": 12
                }
            }
        },
        {
            "id": "crepuscular",
            "username": "Crepuscular",
            "perfs": {
                "atomic": {
                    "rating": 2328,
                    "progress": 3
                }
            }
        },
        {
            "id": "magners",
            "username": "Magners",
            "perfs": {
                "atomic": {
                    "rating": 2321,
                    "progress": 8
                }
            },
            "title": "IM"
        },
        {
            "id": "bahaddin_01",
            "username": "Bahaddin_01",
            "perfs": {
                "atomic": {
                    "rating": 2314,
                    "progress": 3
                }
            }
        },
        {
            "id": "vannto",
            "username": "Vannto",
            "perfs": {
                "atomic": {
                    "rating": 2307,
                    "progress": 9
                }
            }
        },
        {
            "id": "ahsokatanojedi",
            "username": "AhsokaTanoJedi",
            "perfs": {
                "atomic": {
                    "rating": 2303,
                    "progress": 6
                }
            }
        }
    ],
    "horde": [
        {
            "id": "rayholt",
            "username": "RayHolt",
            "perfs": {
                "horde": {
                    "rating": 2805,
                    "progress": -4
                }
            }
        },
        {
            "id": "stubenfisch",
            "username": "Stubenfisch",
            "perfs": {
                "horde": {
                    "rating": 2722,
                    "progress": -25
                }
            },
            "patron": true
        },
        {
            "id": "luquihorde08",
            "username": "LuquiHorde08",
            "perfs": {
                "horde": {
                    "rating": 2671,
                    "progress": 20
                }
            },
            "patron": true
        },
        {
            "id": "golden-horde",
            "username": "Golden-Horde",
            "perfs": {
                "horde": {
                    "rating": 2600,
                    "progress": 4
                }
            }
        },
        {
            "id": "shreyas_adimulam",
            "username": "Shreyas_Adimulam",
            "perfs": {
                "horde": {
                    "rating": 2579,
                    "progress": 12
                }
            }
        },
        {
            "id": "sinamon73",
            "username": "Sinamon73",
            "perfs": {
                "horde": {
                    "rating": 2568,
                    "progress": -8
                }
            },
            "patron": true
        },
        {
            "id": "hod-konem96",
            "username": "hod-konem96",
            "perfs": {
                "horde": {
                    "rating": 2558,
                    "progress": 20
                }
            }
        },
        {
            "id": "twink-73",
            "username": "twink-73",
            "perfs": {
                "horde": {
                    "rating": 2549,
                    "progress": 80
                }
            }
        },
        {
            "id": "pocketnines",
            "username": "PocketNines",
            "perfs": {
                "horde": {
                    "rating": 2545,
                    "progress": -1
                }
            }
        },
        {
            "id": "captain_armenia",
            "username": "Captain_Armenia",
            "perfs": {
                "horde": {
                    "rating": 2527,
                    "progress": 25
                }
            }
        }
    ],
    "racingKings": [
        {
            "id": "royalmaniac",
            "username": "RoyalManiac",
            "perfs": {
                "racingKings": {
                    "rating": 2502,
                    "progress": -12
                }
            },
            "patron": true
        },
        {
            "id": "seth_7777777",
            "username": "seth_7777777",
            "perfs": {
                "racingKings": {
                    "rating": 2381,
                    "progress": -15
                }
            }
        },
        {
            "id": "queeneatingdragon",
            "username": "QueenEatingDragon",
            "perfs": {
                "racingKings": {
                    "rating": 2362,
                    "progress": 3
                }
            }
        },
        {
            "id": "huangyudong",
            "username": "huangyudong",
            "perfs": {
                "racingKings": {
                    "rating": 2347,
                    "progress": 19
                }
            }
        },
        {
            "id": "natso",
            "username": "Natso",
            "perfs": {
                "racingKings": {
                    "rating": 2346,
                    "progress": 4
                }
            },
            "patron": true
        },
        {
            "id": "aliakbar2011",
            "username": "AliAkbar2011",
            "perfs": {
                "racingKings": {
                    "rating": 2333,
                    "progress": 10
                }
            }
        },
        {
            "id": "peanutbutter12345",
            "username": "Peanutbutter12345",
            "perfs": {
                "racingKings": {
                    "rating": 2325,
                    "progress": -2
                }
            },
            "patron": true
        },
        {
            "id": "walker_22",
            "username": "Walker_22",
            "perfs": {
                "racingKings": {
                    "rating": 2318,
                    "progress": 14
                }
            }
        },
        {
            "id": "imakemanymistakes",
            "username": "IMakeManyMistakes",
            "perfs": {
                "racingKings": {
                    "rating": 2299,
                    "progress": 2
                }
            }
        },
        {
            "id": "chesshyperofficial",
            "username": "ChessHyperOfficial",
            "perfs": {
                "racingKings": {
                    "rating": 2292,
                    "progress": 9
                }
            }
        }
    ]
}

/*let leaderboard={}
 for (const category in data) {
      for (const player in data[category]) {
        /*console.log(data[category][player]['perfs'] + 'for user' + data[category][player]['username'])*/
/*        leaderboard[category]=data[category][player]['username']
        
      }
    }
    console.log(leaderboard) */
    
let leaderboard={}
  for (const category in data) {
    for (const player in data[category]) {
    /*leaderboard[category]+=(data[category][player]['username']) */
     /* leaderboard[category]+ data[category][player]['username'] */
      /*console.log(data[category][player]['username']) */
      leaderboard[category]=data[category][player]['username']
      
     /* console.log(data[category][player]['username'] ) */
      console.log(leaderboard[category] + ' for user ' + data[category][player]['username']) 
  
  }
}

// /*console.log(leaderboard) *

console.log(leaderboard)
 

Javascript Online Compiler

Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.

About Javascript

Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.

Key Features

  • Open-source
  • Just-in-time compiled language
  • Embedded along with HTML and makes web pages alive
  • Originally named as LiveScript.
  • Executable in both browser and server which has Javascript engines like V8(chrome), SpiderMonkey(Firefox) etc.

Syntax help

STDIN Example

var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

rl.on('line', function(line){
    console.log("Hello, " + line);
});

variable declaration

KeywordDescriptionScope
varVar is used to declare variables(old way of declaring variables)Function or global scope
letlet is also used to declare variables(new way)Global or block Scope
constconst is used to declare const values. Once the value is assigned, it can not be modifiedGlobal or block Scope

Backtick Strings

Interpolation

let greetings = `Hello ${name}`

Multi line Strings

const msg = `
hello
world!
`

Arrays

An array is a collection of items or values.

Syntax:

let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);

Example:

let mobiles = ["iPhone", "Samsung", "Pixel"];

// accessing an array
console.log(mobiles[0]);

// changing an array element
mobiles[3] = "Nokia";

Arrow functions

Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.

Syntax:

() => expression

Example:

const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
                                    .map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);

De-structuring

Arrays

let [firstName, lastName] = ['Foo', 'Bar']

Objects

let {firstName, lastName} = {
  firstName: 'Foo',
  lastName: 'Bar'
}

rest(...) operator

 const {
    title,
    firstName,
    lastName,
    ...rest
  } = record;

Spread(...) operator

//Object spread
const post = {
  ...options,
  type: "new"
}
//array spread
const users = [
  ...adminUsers,
  ...normalUsers
]

Functions

function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
  console.log(`Hello ${name}!`);
}
 
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar

Loops

1. If:

IF is used to execute a block of code based on a condition.

Syntax

if(condition){
    // code
}

2. If-Else:

Else part is used to execute the block of code when the condition fails.

Syntax

if(condition){
    // code
} else {
    // code
}

3. Switch:

Switch is used to replace nested If-Else statements.

Syntax

switch(condition){
    case 'value1' :
        //code
        [break;]
    case 'value2' :
        //code
        [break;]
    .......
    default :
        //code
        [break;]
}

4. For

For loop is used to iterate a set of statements based on a condition.

for(Initialization; Condition; Increment/decrement){  
//code  
} 

5. While

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while (condition) {  
  // code 
}  

6. Do-While

Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.

do {  
  // code 
} while (condition); 

Classes

ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.

Syntax:

class className {
  constructor() { ... } //Mandatory Class method
  method1() { ... }
  method2() { ... }
  ...
}

Example:

class Mobile {
  constructor(model) {
    this.name = model;
  }
}

mbl = new Mobile("iPhone");