title: MongoDB MapReduce Composite Key Issue
body: <p>First, I am new to MongoDB and I would like to do big-data analysis with MongoDB.<br>
  In my question I have a MonogoDB collection with the following data</p>
  
  <pre><code> db.EIRLogs2.find()
  { "_id" : ObjectId("57772d1f152d447caa142fbf"), "NAME" : "Kamal", "AGE" : 20, "MARKS" : 100 }
  { "_id" : ObjectId("57772d1f152d447caa142fc0"), "NAME" : "Kamal", "AGE" : 30, "MARKS" : 300 }
  { "_id" : ObjectId("57772d1f152d447caa142fc1"), "NAME" : "Sunil", "AGE" : 30, "MARKS" : 300 }
  { "_id" : ObjectId("57772d1f152d447caa142fc2"), "NAME" : "Sunil", "AGE" : 30, "MARKS" : 400 }
  { "_id" : ObjectId("57772d1f152d447caa142fc3"), "NAME" : "Kasun", "AGE" : 20, "MARKS" : 100 }
  { "_id" : ObjectId("57772d1f152d447caa142fc4"), "NAME" : "Kamal", "AGE" : 20, "MARKS" : 100 }
  { "_id" : ObjectId("57772d1f152d447caa142fc5"), "NAME" : "Kasun", "AGE" : 20, "MARKS" : 100 }
  { "_id" : ObjectId("57772d1f152d447caa142fc6"), "NAME" : "Sunimal", "AGE" : 30, "MARKS" : 100 }
  { "_id" : ObjectId("57772d1f152d447caa142fc7"), "NAME" : "Kamal", "AGE" : 20, "MARKS" : 600 }
  </code></pre>
  
  <p>And I am expecting to apply a MapReduce function to above data set and get an answer as below </p>
  
  <pre><code>{ "_id" : "Kamal",   "AGE" : 20, "value" : 800 }
  { "_id" : "Kamal",   "AGE" : 30, "value" : 300 }
  { "_id" : "Kasun",   "AGE" : 20, "value" : 200 }
  { "_id" : "Sunil",   "AGE" : 30, "value" : 700 }
  { "_id" : "Sunimal", "AGE" : 20, "value" : 100 }
  </code></pre>
  
  <p>I used below code to get above answer but it returned an error</p>
  
  <pre><code>db.EIRLogs2.mapReduce(  
        function() { 
             emit( {this.NAME,this.AGE}, this.MARKS ); 
        }, 
        function(key,values){ 
           return Array.sum(values)
        }, 
        { out: "ETom" } 
  )
  </code></pre>
  
  <p>I got the following error</p>
  
  <pre><code>Sat Jul  2 09:17:32 SyntaxError: missing : after property id (shell):1
  </code></pre>
  
  <p>I highly appreciate your help to resolve this issue </p>