UpdateExpression="set #app[idx].#st = :stVal",
I have stored the value of idx as variable. But DynamoDB throws error saying invalid 'idx'.
How do I use the value stored in idx in UpdateExpression.
The simple answer to this would be to using format strings and then replace.
updateExp = "set #app[{}].#st = :stVal".format(idx)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.