Search code examples
aws-lambdaamazon-dynamodbdynamodb-queriesaws-sdk-js

DynamoDB is saving the json object with wrong key and value positions on Javascript SDK


the key and value positions are saving with wrong order in dynamoDB

for example..

if i send a put command with

{ "name 1" : "value 1", "name 2" : "value 2", "name 3" : "value 3", }

it saves:

{ "name 2" : "value 2", "name 1" : "value 1", "name 3" : "value 3", }

how to avoid this ?


Solution

  • the answer is this npm package !

    https://www.npmjs.com/package/json-order?activeTab=readme