sqs-object
Convert JavaScript objects to SQS Meta attributes as vice verse.
Installation
$ > npm install sqs-object --save
Usage
const sqsObject = ;
Mapping
First define a mapping between the JavaScript object and the SQS Meta Attributes like this:
const mapping = objectKey: 'id' sqsKey: 'ID' sqsType: 'Number' objectKey: 'name' sqsKey: 'Name' sqsType: 'String' objectKey: 'age' sqsKey: 'Age' sqsType: 'Number' ;
Object to Meta Attributes
const meta = sqsObject;
Meta Attributes to Object
const object = sqsObject;
License
Feel free to use the code, it's released using the MIT license.