This may be duplicate Question but i have tries alot but i didnt get my result, Here is my firebase structure
Updated
I need to fin
To solve this, I recommend you to change your database structure a little bit. Because there is no way to use in a query dynamic values, or wildcards, you database schema should look like this:
Expense_monts
|
--- November_2018
|
--- -LQ ... Gb
| |
| --- expensesName: "gross"
| |
| --- total: 66
| |
| --- day: "Monday"
|
--- -LQ ... LO
|
--- expensesName: "oil"
|
--- total: 33
|
--- day: "Tuesday"
As you can see, there is no need to use that extra child (3, 4 and so on). In this case, a query that looks like this:
expensesaddref = databaseReference.child(username).child("Expense_Month").child(monthyr);
expensesaddref.orderByChild("expensesName").equalTo("oil")
.addListenerForSingleValueEvent(/* ... */);
Will work perfectly fine.