One of the attributes in my DynamoDB table is a list called REQUEST_IDS, and I want to check the length of that list to see if it satisfies a condition (less than 10) before update the item. How can I refer to the array length in my ConditionExpression in nodejs? Is this doable?
You are looking for the conditional operation size (docs)
In your case: ConditionExpression: 'size(REQIEST_IDS) < 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With