This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Recursive function to get UpdateExpression,ExpressionAttributeValues & ExpressionAttributeNames to update a nested object on dynamoDB | |
* All levels of the nested object must exist previously on dynamoDB, this only update the value, does not create the branch. | |
* Only works with objects of objects, not tested with Arrays. | |
* @param obj , the object to update. | |
* @param k , the seed is any value, takes sense on the last iteration. | |
*/ | |
function getDynamoExpression(obj, k) { | |
const key = Object.keys(obj); |