title: Mongodb update all the documents with unique id
body: <p>I have collection with name <code>products</code> with almost 100k documents. I want to introduce a new key called <code>secondaryKey</code> with unique value <a href="https://www.npmjs.com/package/uuid" rel="noreferrer"><code>uuid</code></a>  in all the documents.
  I do this using <code>nodejs</code>.</p>
  <p>Problem I am facing:-</p>
  <p>When I try the below query,</p>
  <pre><code>db.collection('products').updateMany({},{&quot;$set&quot;:{secondaryKey: uuid()}});
  </code></pre>
  <p>Here it updates all the documents with same <code>uuid</code> value,</p>
  <p>I try with loop to update document one by one,but here issues is I don't have <code>filter</code> value in <code>updateOne</code> because I want to update all the documents.</p>
  <p>Can anyone please help me here.
  Thanks :)</p>