I am trying to implement PATCH - application/merge-patch+json for my application. I need to update nested dictionaries depending on the request that comes in.
Now, at the backend, this data is stored in DynamoDB. I can't figure out how to build the dynamoDB.updateItem
payload dynamically. I.e. set_expression, name_attributes and attribute_values.
I tried following the answer here https://stackoverflow.com/a/71110148 but the while loop is misplaced in the code and I can't figure out what all needs to be nested under it.
Any help is appreciated. Thanks.