Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
How to insert nested maps in DDB using javascript

I’m trying to insert a nested map into my dynamo DB row but can’t wrap my head around how to do it using js.

Here's the object I was trying to update into the DDB

   "person":{
     "M":{
         "name":{
           "M":{
               "david":{ 
                  "M":{
                     "cars":{ 
                        "SS":[
                           "suv",
                           "jeep"
                        ]
                     }
                  }
               }
            }
         }
      }
   }

Here are my objects

 interface david{
cars[]
}

var name = "name";

Here's What I tried

UpdateExpression: 'SET person.#name = :david'
ExpressionAttributeNames:{
"#name": name,
"#pname": "david",
"#cars": "cars"
}
ExpressionAttributeValues:{
":cars" : {SS:["suv","jeep"]},
":david" : {//TODO: how do i substitute the value of cars here}

I'm not really sure how to build the update expression to update the nested maps

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!