code: function toValueFromAttributeValue(attributeValue) {
    if (!attributeValue || typeof attributeValue !== 'object') {
      return attributeValue;
    }
    const values = Object.getOwnPropertyNames(attributeValue).map(type => {
      return toValueFromAttributeTypeAndValue(type, attributeValue[type])
    });
    if (values.length !== 1) {
      throw new Error(`Found ${values.length} values on DynamoDB AttributeValue (${stringify(attributeValue)}), but expected only one!`);
    }
    return values[0];
  }
docs: Attempts to convert the given DynamoDB AttributeValue object into its equivalent JavaScript value.
  @param {Object} attributeValue - a DynamoDB AttributeValue object
  @returns {*} a JavaScript value