title: Round decimal to nearest integer in MongoDB aggregation framework
body: <p>I have gone through below site but Can't get my solution.
  <a href="https://stackoverflow.com/questions/17482623/rounding-to-2-decimal-places-using-mongodb-aggregation-framework">Round to 2 decimal</a></p>
  
  <p>I have below decimals and want to round to nearest integer:</p>
  
  <pre><code>34.56 =&gt; 35
  34.67 =&gt; 35
  34.12 =&gt; 34
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>            "$subtract": [
                          "$x",
                          { "$mod": ["$x", 1] }
                      ]
  </code></pre>
  
  <p>Same like in <strong>Oracle Round function</strong></p>
  
  <p>How can I do in MongoDB?</p>