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

167
Views
How to convert DynamoDB JSON to a regular Javascript object

How can I convert a DynamoDB JSON object to a regular object in JavaScript?

Example DynamoDB object:

{
 "key1": {
  "S": "val1"
 },
 "key2": {
  "S": "val2"
 },
 "key3": {
  "M": {
   "key4": {
    "M": {
     "key5": {
      "S": "val5"
     }
    }
   }
  }
 },
 "key6": {
  "S": "val6"
 }
}

Expected output:

{
 "key1": "val1",
 "key2": "val2",
 "key3": {
  "key4": {
   "key5": "val5"
  }
 },
 "key6": "val6"
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the unmarshall function in the @aws-sdk/util-dynamodb library.

const { unmarshall } = require("@aws-sdk/util-dynamodb");

const regularObject = unmarshall(dynamoObject);

console.log(regularObject); // Will output converted object
about 4 years ago · Juan Pablo Isaza Report
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!