title: DynamoDB putitem in NodeJs - arrays of objects
body: <p>I'm trying to set up a small api from AWS Lambda to DynamoDB and I am having trouble figuring out if and how I can write an array of objects into a key.</p>
  
  <p>I have an object like</p>
  
  <pre><code>{
      "teamName": "Team Awesome",
      "members": [
          {
              "email": "person-1@example.com",
              "name": "Bob"
          },
          {
              "email": "person-2@example.com",
              "name": "Alice"
          }
      ]
  } 
  </code></pre>
  
  <p>The members array is giving me issues, in the docs it looks like it can be done considering the list types, but there is just no example how HOW to do it, and I am running out of ways to try it. </p>
  
  <p>So is it possible to write something in this format at all and how do you in that case do it?</p>
  
  <p>Example code - what do I put at ???</p>
  
  <pre><code>var AWS = require('aws-sdk');
  var dynamodb = new AWS.DynamoDB();
  
  exports.handler = function(event, context) {
      var tableName = "GDCCompetition";
      var datetime = new Date().getTime().toString();
  
      DynamoDB.putItem({
          "TableName": tableName,
          "Item": {
              "datetime": {
                  "N": datetime
              },
              "teamName": {
                  "S": event.teamName
              },
              "members": ???
          }
      });
  }
  </code></pre>