deformationMap

Spec

deformationMap<TTarget>(
    target: { M: MapAttributeValue }, 
    TClass: ClassCapture<TTarget>
): TTarget

Convert (M) to entity.

Input

Name

Type

Information

target

{ M: MapAttributeValue }

AttributeValue(M) to convert to entity.

TClass

ClassCapture<TTarget>

Reference of @DynamoEntity class

Example

const entity: Cat = Mapper.deformationMap(
    {
        M: {
            id: { N: "666" },
            name: { S: "garfield" }
        }
    },
    Cat
);

It will be deformationed as,

Cat {
    "id": 666,
    "name": "garfield"
}

Last updated

Was this helpful?