fbpx
Get an object using NodeJS:
// NodeJS example
context.getDoc("myKey", function(err, res) {
  if(res) {
    console.log('my Value is ' + res);
    var body = {
      res: res
    }
  }
}
Get an object using Python:
//Python example
def main(event, context):
    print ('context: %s' % context)
    doc = context.get_doc('myKey')
    print(doc)  #myValue
    res = {
        'statusCode': 200,
        'body': 'res: %s' % doc,
        'headers': {"Content-Type": "application/json"}
    }
    return res