title: Query a document on array elements in MongoDB using Java
body: <p>I am new to MongoDB. My sample document is</p>
  
  <pre><code>{
      "Notification" : [
          {
              "date_from" : ISODate("2013-07-08T18:30:00Z"),
              "date_too" : ISODate("2013-07-30T18:30:00Z"),
              "description" : "fdfd",
              "url" : "www.adf.com"
          },
          {
              "date_from" : ISODate("2013-07-01T18:30:00Z"),
              "date_too" : ISODate("2013-07-30T18:30:00Z"),
              "description" : "ddddddddddd",
              "url" : "www.pqr.com"
          }
      ],
  </code></pre>
  
  <p>I am trying to update the Notification whose <code>"url" : "www.adf.com"</code>. My Java code to do this is:</p>
  
  <pre><code>BasicDBObject query=new BasicDBObject("url","www.adf.com");
  
  DBCursor f = con.coll.find(query);
  </code></pre>
  
  <p>It does not search for the document whose <code>"url"</code> is <code>"www.adf.com"</code>.</p>