title: How to add key in along with array object in node js
body: <p>Here is my a resultant array and now I want to add extra key along with <strong>current</strong> key.
  tried .<strong>push is not a function</strong></p>
  
  <pre><code>aa[0]['new_key'] = 'blah';    // is not working
  </code></pre>
  
  <p>My array is looks like.</p>
  
  <pre><code> var aa =  [
          {
            "main": "56d940bb2b5916181d0906e2",
            "current": 6544
          }
        ]
  </code></pre>
  
  <p>And my original code is using mongoDB query.</p>
  
  <pre><code>connection.modal.find( { 'user_id' : user_id }, { 'abc.def' : true}, function ( err, result ) {
  
              if ( !err ) {
  
                  if( result.length ) {
  
                      result[0]['abc'].def[0]['new_key']  = 'blah';
                      response['success'] = true;
                      response['result'] = result[0]['abc'].def;
                      response['msg'] = 'data fetch';
                      res.json(response);
                  } else {
  
                      response['success'] = false;
                      response['result'] = '';
                      response['msg'] = 'No record found';
                      res.json(response);
                  }
              } else {
  
                  response['success'] = false;
                  response['result'] = '';
                  response['msg'] = 'Error';
                  res.json(response);
              }
          });
  </code></pre>