You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { collection, query, where } from "firebase/firestore";
const citiesRef = collection(db, "cities");
// Create a query against the collection.
const q = query(citiesRef, where("state", "==", "CA"));
How can I do something like
const serialized = JSON.stringify(q);
const q2 = Query.fromJson(JSON.parse(serialized));//query from json
?
It doesn't have to be this way, exactly. I know that Query has a constructor. If it's possible to do something like below it would work too. Basically a way to extract the relevant arguments from the original query to create a new one (the same as the original).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Given that I have any query, for example
How can I do something like
?
It doesn't have to be this way, exactly. I know that Query has a constructor. If it's possible to do something like below it would work too. Basically a way to extract the relevant arguments from the original query to create a new one (the same as the original).
Beta Was this translation helpful? Give feedback.
All reactions