I have an item in a dynamodb table that has a key of type map. The name of the key is mykey and the map stored in the key is:
{
name: something
address: somewhere
}
I want to add a new item to this map data. Let's say for example, color. The updated map should look like this:
{
name: something
address: somewhere
color: red
}
I am using JavaScript SDK but I'm unable to figure out how to go about this. After reading documentation, I think I need to use list_append in updateItem function but I am not able to figure out how.
I do not want to read data, add the new key-value, and write back. This will create a 'read before write' concurrency problem as I have multiple processes trying to update the map.