title: Insert into existing map a map structure in DynamoDB using Nodejs
body: <p>Structure of an item in database is as shown below:</p>
  
  <pre><code>{
      "cars": {
          "x": [
              {
                  "time": 1485700907669,
                  "value": 23
              }
          ]
      },
      "date": 1483214400000,
      "id":"1"
  }
  </code></pre>
  
  <p>I have to add a new item "z" of type list to cars like</p>
  
  <pre><code>{
      "cars": {
          "x": [
              {
                  "time": 1485700907669,
                  "value": 23
              }
          ],
          "z": [
              {
                  "time": 1485700907669,
                  "value": 23
              }
          ]
      },
      "date": 1483214400000,
      "id": "1"
  }
  </code></pre>
  
  <p>What would the update expression in Node.js look like if I want to achieve somethings like this?
  So far this is what I came up with:
  <code>set #car.#model= list_append(if_not_exists(#car.#model, :empty_list), :value)</code></p>
  
  <p>However, if the item does not exist at the time of creation it throws error. Any idea how to do this?</p>
  
  <p>This is the updated parameter I am using, still doesn't work</p>
  
  <pre><code>  var params = {
    TableName:table,
    Key:{
        "id": id,
        "date": time.getTime()
    },
    ReturnValues: 'ALL_NEW',
    UpdateExpression: 'SET #car.#model = if_not_exists(#car.#model,     
    :empty_list)',
    ExpressionAttributeNames: {
      '#car': 'cars',
      '#model':"z"
    },
    ExpressionAttributeValues: {
      ':empty_list': [],
    }
   };
  </code></pre>