I want to retrieve data from a child "Orders" but data is stored under a number then data is stored under a key which is generated in another application but I can't find a way
this is the code of recycle view where data is being retrieved
recyclerVieww.setLayoutManager(new LinearLayoutManager(this));
FirebaseRecyclerOptions<historyModel> options =
new FirebaseRecyclerOptions.Builder<historyModel>()
.setQuery(FirebaseDatabase.getInstance().getReference().child("OrdersAdimin")
, historyModel.class)
.build();
catAdapt = new historyAdapter(options);
recyclerVieww.setAdapter(catAdapt);
this is the JSON file:
"Orders": {
"12": {
"-NV3N3KYwcjXo5hfZ6h1": {
"BuyerPhoen": "12",
"PickUP": "Of-16",
"date": "May 10, 2023",
"orderId": "-NV3N3KYwcjXo5hfZ6h1",
"productName": "Sprite(250ml)",
"productPrice": "₹25",
"quantity": "1",
"time": "12:06:37 PM",
"totalPrice": 25
}
}