I have a database in Firebase with the following data:
{
user: 1;
points: 100;
},
{
user: 1;
points: 510;
},
{
user: 2;
points: 110;
},
{
user: 1;
points: 85;
},
{
user: 3;
points: 300;
},
{
user: 1;
points: 500;
}
How can I make a query so that it only shows the fields of user 1 sorted from highest to lowest with REST queries?
I have tried with
https://xxxxxx.firebaseio.com/tirada.json?orderBy="user"&equalTo="1"
And it returns filtered by User but without sorting by Points
{
user: 1;
points: 100;
},
{
user: 1;
points: 510;
},
{
user: 1;
points: 85;
},
{
user: 1;
points: 500;
}
I need this result
{
user: 1;
points: 85;
},
{
user: 1;
points: 100;
},
{
user: 1;
points: 500;
},
{
user: 1;
points: 510;
}
Thank's