awspilot / dynamodb-oop

Speak fluent DynamoDB, write code with fashion, I Promise() 😃
https://awspilot.dev
MIT License
119 stars 28 forks source link

Support for updating nested json in dynamoDB #32

Open mayurizingadeCL opened 7 years ago

mayurizingadeCL commented 7 years ago

Hello,

I am able to connect to dynamoDB, get list of ducments from database. I could update string values in documents as well. If details is string it is working fine.

          DynamoDB
                    .table('user')
                    .where('id').eq(customer.id)
                    .update({
                        "EmailAddress": customer.EmailAddress,
                        "data": details
                    }, function( err, data ) {
                        console.log("555 "+ err )
                        console.log( data )
                });

But How can I update nested JSON, using this "aws-dynamodb" npm module, when details is nested json.

Please let me know.

Thanks, Mayuri Zingade

adrianpraja commented 7 years ago

Unfortunately you will have to update the entire root attribute

The library does not support it yet