how to get the max value of a field in MongoDB
<p>like:</p>

<pre><code>{id:4563214321,updateTime:long("124354354")}
</code></pre>

<p>there are always new collections enter the db, so I would like to <strong>always</strong> get <strong>latest</strong> updated documents aka the largest update time. how to design the shell script? thanks in advance.</p>