From a8d140ae7985551b73ea3a2b660f517b1bfc7cc0 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Fri, 22 May 2009 10:47:45 -0400 Subject: BSONObj::operator[string] --- db/jsobj.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/jsobj.h b/db/jsobj.h index a634e680b2e..cac05936cd3 100644 --- a/db/jsobj.h +++ b/db/jsobj.h @@ -576,6 +576,10 @@ namespace mongo { return getField(field); } + BSONElement operator[] (const string& field) const { + return getField(field); + } + BSONElement operator[] (int field) const { stringstream ss; ss << field; -- cgit v1.2.1