title: Is there any way to replace an entire array in MongoDB?
body: <p>So, I have a problem in MongoDB... I have stored some data in MongoDB and it basically looks like:</p>
  
  <pre><code>{
      _id: 1,
      name: "aa",
      importance: [0.5, 0.25, 0.25]
  }
  </code></pre>
  
  <p>Where this importance attribute is an array that I will have to keep updating, e.g., after getting some data, it should be updated to [0.80, 0.10, 0.10]...</p>
  
  <p>In this toy problem, I don't really understand how to replace a full array. Do I have to do it elementwise somehow? If so, it is not a tractable solution in my case, because the number of elements in my array reach above 1000.</p>