DynamoDB: Query Ends With (Guide w/ Code Examples)
![Rafal Wilinski](https://pbs.twimg.com/profile_images/1390706809548197895/SVCKpLNE_400x400.png)
Provided by Rafal Wilinski
To query items where a specific attribute ends with a certain string, you can use the endsWith
condition in the KeyConditionExpression
parameter of the query operation.
Note that, the attributeName
should be the name of the attribute you want to use in the condition, and the value
should be the string you want to match the end of the attribute with.
var params = { TableName: "myTable", KeyConditionExpression: "attributeName endsWith :value", ExpressionAttributeValues: { ":value": "stringToMatch" } }; dynamodb.query(params, function(err, data) { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Get List Of Items
- DynamoDB: Delete Table
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Get All Items
- DynamoDB: Query Group By
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Query JSON
- DynamoDB: Bulk Insert
- DynamoDB: BatchGetItem
- DynamoDB: Delete
- DynamoDB: Get Last 10 Records
- DynamoDB: Query Count
- DynamoDB: Create if Not Exists
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Get By ID
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2024 Dynobase