title: How to get sorted data from Firebase Database?
body: <p>How I can get <strong>TOP three</strong> users(maybe in HashMap) with name and userScore from all users in Firebase Database? HashMap must be <strong>order by userScore</strong>. Or get <strong><code>ArrayList&lt;User&gt; usersList</code></strong> with three sorted users by userScore.
  <a href="https://i.stack.imgur.com/NGztR.png" rel="nofollow noreferrer">database</a></p>
  
  <pre><code>{"top_clicker_db" : { 
      "total_clicks" : 3401,
      "user" : {
        "-KkePRVzO_lLLgp7fqX0" : {
          "name" : "fly",
          "userScore" : 2000
        },
        "-KkjWk0L2lR8RwUXF2Bd" : {
          "name" : "lg",
          "userScore" : 24
        },
        "-KkjjxNw8fj_XG9uUPEg" : {
          "name" : "fjfg",
          "userScore" : 304
        },
        "-KkjoakdLIjYlBEM1pkq" : {
          "name" : "Geny",
          "userScore" : 100
        },
        "-KklVAOkk2WJaRmH9cKk" : {
          "name" : "fly",
          "userScore" : 941
        }
      }
    }
  }
  </code></pre>
  
  <p>I need:</p>
  
  <pre><code>fly=2000;
  fly=941;
  fjfg=304;
  </code></pre>