title: dynamodb: query with hash key only
body: <p>I have this table:</p>
  
  <ul>
  <li>DomainId string HashKey </li>
  <li>EmailId string RangeKey</li>
  </ul>
  
  <p>I was wondering if it's possible query this table with HashKey only, like this:</p>
  
  <pre><code>var AWS = require("aws-sdk");   
  var client = new AWS.DynamoDB.DocumentClient();
  var dm = 'infodinamica.cl';
  
  //Set params
  var params = {
      TableName : 'table-name',
      KeyConditionExpression: "DomainId = :dm",       
      ExpressionAttributeValues: {
          ":dm": dm
      },
      Select: 'COUNT'
  };
  
  client.query(params, (err, data) =&gt; {
      if(err)
          console.log(JSON.stringify(err, null, 2));
      else
          console.log(JSON.stringify(data, null, 2));
  }
  </code></pre>
  
  <p>ps: note that this table has HashKey and RangeKey.</p>