dynamodb-utils.js
function toKeyValuePairs(dynamoDBMap) {
  return dynamoDBMap && typeof dynamoDBMap === 'object' ?
    Object.getOwnPropertyNames(dynamoDBMap).map(key => [key, toValueFromAttributeValue(dynamoDBMap[key])]) : [];
}
function toKeyValuePairs(dynamoDBMap) {
  return dynamoDBMap && typeof dynamoDBMap === 'object' ?
    Object.getOwnPropertyNames(dynamoDBMap).map(key => [key, toValueFromAttributeValue(dynamoDBMap[key])]) : [];
}
function toKeyValuePairs ( dynamoDBMap ) { return dynamoDBMap && typeof dynamoDBMap === 'object' ? Object . getOwnPropertyNames ( dynamoDBMap ) . map ( key => [ key , toValueFromAttributeValue ( dynamoDBMap [ key ] ) ] ) : [ ] ; }
Extracts an array of key value pairs from the given DynamoDB map object. Each key value pair is represented as an
array containing a key property name followed by its associated value.
@param {Object} dynamoDBMap - a DynamoDB map object
@returns {KeyValuePair[]} an array of key value pairs
Extracts an array of key value pairs from the given DynamoDB map object . Each key value pair is represented as an array containing a key property name followed by its associated value .