title: Way to order data fetched by .data() firebase
body: <p>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?</p>
  <p>I fetch the data using:</p>
  <pre><code>const snapshot = await getDocs(collection(db, currentUser.uid))
  console.log(snapshot[0].data())
  </code></pre>
  <p>^ I am using this <code>getDocs()</code>-system, because I need the other docs ids for another tasks in case you wonder</p>
  <p>EDIT:
  Here is the structure of my database:
  <a href="https://i.stack.imgur.com/KIl4m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KIl4m.png" alt="enter image description here" /></a></p>
  <p>In this case the <code>snapshot[0].data()</code> would sometimes be <code>{field1 : &quot;&quot;, field2 : &quot;&quot;}</code> and sometimes be <code>{field2: &quot;&quot;, field1: &quot;&quot;}</code></p>