So I have a list of paragraphs in my firebase realtime database
And I want to randomly retrieve multiple of them based on random array values like
const x = [0, 2, 5].
I retrieve data with get()
const parasnapshot0 = await get(child(dbRef, `paragraphs/${x[0]}`));
const parasnapshot1 = await get(child(dbRef, `paragraphs/${x[1]}`));
const parasnapshot2 = await get(child(dbRef, `paragraphs/${x[2]}`));
The problem with this is it won't scale well and the query made to firebase would hog on the network. Is there a way to make 1 query and retrieve a list/json of the items I need? Something like:
const parasnapshot2 = await get(child(dbRef, `paragraphs/${x[0]},${x[1]},${x[2]}`));