title: send multiple objects in Lambda function
body: <p>I am writing a method in AWS Lambda using node.js and I am sending single object</p>
  <p>how can I pass multiple objects?</p>
  <p>here is my code</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const mysql = require('mysql');
  var pool  = mysql.createPool({ //  a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required
     host: process.env.RDS_HOSTNAME,
     user: process.env.RDS_USERNAME,
     password: process.env.RDS_PASSWORD,
     port: process.env.RDS_PORT,
    database: process.env.RDS_DATABASE
  });
  
  exports.handler = (event, context, callback) =&gt; {
      // console.log(event);
    let CategoryId = event['CategoryId'];
    let Name = event['Name'];
    let Description = event['Description'];
    let UpdatedBy = event['UpdatedBy'];
    let WrapupId = event['WrapupId'];
    // allows for using callbacks as finish/error-handlers
   context.callbackWaitsForEmptyEventLoop = false;
  pool.getConnection(function(err, connection) {
      if (err) throw err;
      let sql =`UPDATE ctrData2.WrapupCodes SET CategoryId=?, Name=?, Description=?, UpdatedBy=?, UpdatedDate= now() WHERE WrapupId=?`;
       let field = [CategoryId, Name, Description, UpdatedBy, WrapupId];    
      connection.query(sql,field, function (err, result, fields) {
        if (err) throw err;
        connection.release();
        console.log(result);
        console.log(typeof(result.affectedRows));
        let affectedRows = result.affectedRows;
        if(result &amp;&amp; affectedRows &gt; 0){
        let response ={
              status:200,
              message:"Data has been updated successfully"
              //  Name : field[0],
              //  Description : field[1],
              //  UpdatedBy : field[2],
              //  UpdatedDate : field[3],
            };
          //   console.log("I am here:",response);
            callback(null,response);
        }else{
              callback(null,{
                status: 404,
                message: "id not found"
              });
            }
      });
    });
  };</code></pre>
  </div>
  </div>
  </p>
  <p>and here is my object which is am sending</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "CategoryId": "10",
    "Name": "Credit Card Service",
    "Description": "This wrapup should assign to credit card service",
    "UpdatedBy": "Elys Root",
    "WrapupId": "22"
  }</code></pre>
  </div>
  </div>
  </p>
  <p>But I want to send like this in an array</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[
  {
    "CategoryId": "10",
    "Name": "Credit Card Service",
    "Description": "This wrapup should assign to credit card service",
    "UpdatedBy": "Elys Root",
    "WrapupId": "22"
  }
  ],
  
  [
  {
    "CategoryId": "10",
    "Name": "Credit Card Service",
    "Description": "This wrapup should assign to credit card service",
    "UpdatedBy": "Elys Root",
    "WrapupId": "21"
  }
  ]</code></pre>
  </div>
  </div>
  </p>
  <p>How I can send it like this. If anyone of you knows help me. Thanks</p>