title: How to use equals in a FilterExpression for DyanmoDb API
body: <p>I am having a lot of trouble scanning and then using FilterExpression to filter based on a single value. I have looked at the api documentation and other stack overflow questions, but am still having trouble figuring the proper syntax for this. Since I am also using react and javascript for the first time, this may be a problem with my understanding of those. </p>
  
  <p>Below is what I am trying to use as a filter expression. uploadId is the field name in the Dynamo database table and event.pathParameters.id is the variable that should resolve to the value that the scan results are filtered on.</p>
  
  <pre><code>FilterExpression: "uploadId = :event.pathParameters.id"
  </code></pre>
  
  <p>Below is the code in within context:</p>
  
  <pre><code>import * as dynamoDbLib from "./libs/dynamodb-lib";
      import { success, failure } from "./libs/response-lib";
  
  export async function main(event, context, callback) {
    const params = {
      TableName: "uploads",
      FilterExpression: "uploadId = :event.pathParameters.id"
    };
  
    try {
      const result = await dynamoDbLib.call("scan", params);
      if (result.Item) {
        // Return the retrieved item
        callback(null, success(result.Item));
      } else {
        callback(null, failure({ status: false, error: "Item not found." }));
      }
    } catch (e) {
      callback(null, failure({ status: false }));
    }
  }
  </code></pre>
  
  <p>Thank you for your help!</p>