How to update an attached JSON file in DynamoDB

DynamoDB has a map structure and I'm wondering how we can update it. For example, if the map structure is like: {A {B {C, D, E}}} What code should I write if I want to remove E, or I want to remove B and everything that is included in B (C, D, E)?

+3


source to share


1 answer


When:

  • Make UpdateItem with UpdateExpression="DELETE A.B.E"

  • Make UpdateItem with UpdateExpression="DELETE A.B"



Case 2 will remove the nested attribute E, since E is inside AB, so case 2 is a superset of the change described in case 1.

+3


source







All Articles