dynobase-icon
Dynobase

DynamoDB: Query Ends With (Guide w/ Code Examples)

Rafal Wilinski

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); } });

Login to the AWS Console less. Use Dynobase.

First 7 days are on us. No strings attached.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
/
Affiliates & Influencers
© 2024 Dynobase
+
Login to the AWS Console less.
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.