title: Can't write data as nested maps to Firestore in Swift
body: <p>I need a database structure that consists of nested maps such as the following example:</p>
  <p><a href="https://i.stack.imgur.com/HV801.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HV801.png" alt="enter image description here" /></a></p>
  <p>The upper map structure is: (key: &quot;referrals&quot;, value: (key: userId, value: aBooleanValue))</p>
  <p>So I used the following code to accomplish the result above:</p>
  <pre><code>let userId = ...
  let aBooleanValue = ...
  
  database.(...).setData([&quot;referrals&quot;: [userId: aBooleanValue]])
  </code></pre>
  <p>But the code above causes an array inside of a map like the figure below instead of a nested map:</p>
  <p><a href="https://i.stack.imgur.com/L3qiV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L3qiV.png" alt="enter image description here" /></a></p>
  <p>Any ideas how I could get rid of the array here?</p>
  <p><strong>EDIT:</strong> It's my bad. I was modifying the database as an array in another part of the app. So there is no bug here. Sorry.</p>