title: How to add/remove elements from a MongoDB list using spring data?
body: <p>I am using spring data to talk to mongo (although I know there are few downsides to it over the mongo driver for advanced use cases). My application has a mongodb document with one of the elements being a list. Now I want to add/delete specific elements from the list in the document.
  Can someone please tell me if and how spring data supports that (considering its a basic operation)?</p>
  
  <p>I did quite some web search but didn't seem to land on anything concrete.</p>
  
  <p>Any help would be appreciable.</p>
  
  <p><strong>UPDATE 1</strong>:
  Sample document:</p>
  
  <pre><code>{ id: 123, arr: [ 1,2,3,4]}
  </code></pre>
  
  <p>and after update</p>
  
  <p><code>{ id: 123, arr: [ 1,2,3]}</code> or <code>{ id: 123, arr: [ 1,2,3,4,5]}</code></p>