title: Max/Min value(without field name) in mongodb with java
body: <p>I am using the below mentioned MongoDB query in Java to find the maximun value of field <code>price</code>:</p>
  
  <pre><code>DBCursor cursor = coll.find(query,fields).sort(new BasicDBObject("price",1)).limit(1);
  </code></pre>
  
  <p><code>fields</code> argument passing to <code>coll.find</code> function here is having the <code>price</code> field only.</p>
  
  <p>So I am getting the output in the form:</p>
  
  <pre><code>{"price" : value}
  </code></pre>
  
  <p>Is there any way to get value only in the output without the field name and braces etc, so that it can be assigned to a variable or returned to the calling function etc.</p>
  
  <p>Or if there is any other query or mechanism available that I can use for the same purpose.</p>
  
  <p>Pls suggest..</p>
  
  <p>Thanks &amp; Regards</p>