I would like to check if a field value is equal to a certain String.
I tried this :
DBCursor results = coll.find();
while (results.hasNext()) {
if ((results.next().get("name").toString()) == "sammy") {
System.out.print("debug" + (results.next().get("nom").toString()));
}
}
but it returns me nothing, i don't understand.
Thanks for your help.