[{"data":1,"prerenderedAt":33},["ShallowReactive",2],{"snippet-apigateway-dynamodb-typeahead":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":17,"meta":19,"resources":20,"services":21,"snippets":24,"stem":29,"tags":30,"type":31,"__hash__":32},"snippets\u002Fsnippets\u002Fapigateway-dynamodb-typeahead.json","VTL - Typeahead",[7],"content\u002Fcontributors\u002Feric-johnson.json","Direct integration search on DynamoDB","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Fapigateway-dynamodb-typeahead",{"headline":14,"text":15},"How it works",[16],"The snippet demonstrates how to do a search against a GSI and filter the results by text containing a specific string",[18],"VTL",{},null,[22,23],"apigw","dynamodb",[25],{"title":26,"language":27,"code":28},"Direct integration typeahead","vtl","#set( $pageKey = $input.params('pageKey'))\n{\n  \"TableName\": \"myTable\",\n  \"IndexName\":\"OwnerIndex\",\n  \"KeyConditionExpression\": \"#n_owner = :v_owner\",\n  \"FilterExpression\": \"contains(#n_id, :v_searchString)\",\n  \"ExpressionAttributeValues\": {\n    \":v_owner\": {\"S\": \"$context.authorizer.claims.email\"},\n    \":v_searchString\":{\"S\":\"$input.params().path.searchString\"}\n  },\n  \"ExpressionAttributeNames\": {\"#n_owner\": \"owner\", \"#n_id\":\"id\"}\n}","snippets\u002Fapigateway-dynamodb-typeahead",[],"Integration","GBQGz9niisJleu55VSMAmfJkqIK7crh9w9BmxUzbv_s",1792578863866]