title: AWS DynamoDB Scan and FilterExpression using array of hash values
body: <p>I am having a hard time finding a useful example for a scan with FilterExpression on a DynamoDB table. I am using the javascript SDK in the browser. </p>
  
  <p>I would like to scan my table and return only those records that have HASH field "UID" values within an array I pass to the Scan</p>
  
  <p>Lets say I have an array of unique ids that are the hash field of my table
  I would like to query these records from my DynamoDB table. </p>
  
  <p>Something like below </p>
  
  <pre><code>var idsToSearch=['123','456','789'] //array of the HASH values I would like to retrieve
  var tableToSearch = new AWS.DynamoDB();
  var scanParams = {
    "TableName":"myAwsTable",  
    "AttributesToGet":['ID','COMMENTS','DATE'],  
    "FilterExpression":"'ID' in "+idsToSearch+"" 
  
  }
  tableToSearch.scan(scanParams), function(err,data){
      if (err) console.log(err, err.stack); //error handler
      else console.log(data); //success response
  })
  </code></pre>