Skip to content

Instantly share code, notes, and snippets.

@irrationnelle
Last active March 20, 2018 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irrationnelle/172b676e61e2ec009ff55a48acac95a8 to your computer and use it in GitHub Desktop.
Save irrationnelle/172b676e61e2ec009ff55a48acac95a8 to your computer and use it in GitHub Desktop.
import AWS from 'aws-sdk';
const params = {
string: {S: 'foo'},
list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]},
map: {
M: {
nestedMap: {
M: {
key: {S: 'value'}
}
}
}
},
number: {N: '123'},
nullValue: {NULL: true},
boolValue: {BOOL: true}
};
const { unmarshalled } = AWS.DynamoDB.Converter;
const convertedParams = unmarshalled(params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment