Solo quería obtener los datos que provienen de este https://food-ordring-af14d-default-rtdb.firebaseio.com/order , los datos están en forma de JSON y parece que
{ "-MzJLd0sSssh9tbJbjUS" : { "orderDetails" : [ { "amount" : 4, "id" : "m1", "name" : "Shushi", "price" : 22.99 }, { "amount" : 3, "id" : "m2", "name" : "Schnitzel", "price" : 16.5 } ], "user" : { "address" : "A-132 shiv vihar,rishal garden,Nangloi", "city" : "New delhi", "name" : "Bhupender Sharma", "postal" : "110041" } }, "-MzJOf_52xhRQi3izTRV" : { "orderDetails" : [ { "amount" : 2, "id" : "m3", "name" : "Barbecue Burger", "price" : 12.99 }, { "amount" : 2, "id" : "m4", "name" : "Green Bowl", "price" : 18.99 } ], "user" : { "address" : "Nangloi", "city" : "New delhi", "name" : "ANkit", "postal" : "445575" } } }Prueba este código .. aquí un ejemplo
const fetchdata = async()=>{ const response = await fetch('https://jsonplaceholder.typicode.com/todos') const jdata = await response.json() console.log(jdata) } fetchdata()