How does mongo update each element locator of the array to match only the first

  mongodb, question

There is a collection of the following formats

"objectiveQuestions" : [{
 "answer" : "A",
 "index" : 2,
 "isCorrect" : 1,
 "subjectId" : 5967
 }, {
 "subjectId" : 5968,
 "answer" : "A",
 "isCorrect" : 0,
 "index" : 3
 }, ...]

Now for each inobjectiveQuestionsElement additionscoreField, and give the initial value2How is it constructedupdateWhere are the statements

Add onemulti: true

db.collection.update(
 <query>,
 <update>,
 {
 upsert: <boolean>,
 multi: <boolean>,
 writeConcern: <document>
 }
 )

http://docs.mongodb.org/manual/reference/method/db.collection.update/