node.js - dynamodb get item call using aws sdk -



node.js - dynamodb get item call using aws sdk -

i using next code node.js item dynamodb

var params = { attributestoget: [ "password" ], tablename : 'foo', key : { "username" : { "s" : "bar" }, } } db.getitem(params, function(err, data) { if (err) { console.log(err); // error occurred } else { console.log(data); // successful response res.send(data); } homecoming next(); });

but there cases not know key value fetching items. want know whether can fetch items based on attribute values. next :

var params = { attributestoget: [ "password" ], tablename : 'foo', attribute : { "userlocation" : { "s" : "europe" }, } }

you can create global secondary indexes on additional attributes want query. http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/gsi.html

node.js amazon-web-services amazon-dynamodb

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -