I am trying to build a little website that shows all fields in a certain document. The problem is: the order of the fetched fields changes with each refresh. Is there a way to prevent that?
I fetch the data using:
const snapshot = await getDocs(collection(db, currentUser.uid))
console.log(snapshot[0].data())
^ I am using this getDocs()-system, because I need the other docs ids for another tasks in case you wonder
EDIT:
Here is the structure of my database:

In this case the snapshot[0].data() would sometimes be {field1 : "", field2 : ""} and sometimes be {field2: "", field1: ""}