Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
2.6.5
-
None
-
Mac 10.6.8 ox
Description
Hi,
I have an object inside my mongodb like this
{ "_id" : ObjectId("5129d8a4da06f4571f45d1a2"),
"User_Id" : {
"Profile" :
} }.
Now i want to check the profile value is Naveen_009,if result is true i want to insert data like this
"Twitter" :
.
To do this am using following logic.
BasicDBObject query =new BasicDBObject().append("009.Profile","Naveen_009");
BasicDBObject newDocument3 = new BasicDBObject().append("$set", new BasicDBObject(key,arrayObj));
collection.findAndModify(query, newDocument3);
But as a result am getting result in some unwanted manner like this
,
"08 Feb 2013" : [ 1253, 857, 55, 341 ],
"09 Feb 2013" : [ 890, 546, 35, 309 ],
"10 Feb 2013" : [ 728, 458, 30, 240 ] },
"_id" : ObjectId("5129bf1dda06f4709d2b98ee") }
Help me to get required result if u suggest some books it il be help full too.