title: map invoke failed: JS Error: Error: fast_emit takes 2 args (anon):1
body: <p>A collection will be created from the below js file , i need three Fields in my collection so i have given</p>
  
  <pre><code> emit(this.cust_id, 1,date);
  </code></pre>
  
  <p>Its giving the below Error </p>
  
  <p>map invoke failed: JS Error: Error: fast_emit takes 2 args (anon):1</p>
  
  <p>But its working fine with <code>emit(this.cust_id, 1);</code></p>
  
  <p>Please tell me ow to include date aslo in the collection created ??</p>
  
  <pre><code>m = function() { 
   var currentDate = new Date();
          currentDate.setDate(currentDate.getDate()-1);
          var month = (currentDate.getMonth() &lt; 9 ? "0"+ (currentDate.getMonth()+1) : (currentDate.getMonth()+1));
          var day = (currentDate.getDate() &lt; 10 ? "0" + currentDate.getDate() : currentDate.getDate());
          var date = currentDate.getTime();
  emit(this.cust_id, 1,date);
   }
  
  r = function (k, vals) { var sum = 0; for (var i in vals) { sum += vals[i]; } return sum; }
  
     q = function() {
          var currentDate = new Date();
          currentDate.setDate(currentDate.getDate()-1);
          var month = (currentDate.getMonth() &lt; 9 ? "0"+ (currentDate.getMonth()+1) : (currentDate.getMonth()+1));
          var day = (currentDate.getDate() &lt; 10 ? "0" + currentDate.getDate() : currentDate.getDate());
          var date = currentDate.getTime();
          var patt = date;
          var query = {"created_at":"2013-30-04 11:19:52.587"};
          return query;
  }
  
  
  res = db.logins.mapReduce(m, r, { query : q(), out :  "LoginCount" });
  </code></pre>