deformationList

Spec

deformationList<TTarget>(
    target: { L: ListAttributeValue }, 
    TClass: ClassCapture<TTarget>
): TTarget[]

Convert (L) to EntityArray.L.

Input

Name

Type

Information

entityArrayValue

{ L: ListAttributeValue }

AttributeValue(L) to convert to array.

TClass

ClassCapture<TTarget>

Reference of TTarget .

Example

const entity: Cat[] = Mapper.deformationEntityArray(
    {
        L: [
            { M: { id: { N: "666" }, name: { S: "garfield" } } },
            { M: { id: { N: "777" }, name: { S: "doreamong" } } }
        ]
    },
    Cat
);

It will be deformationed as,

[
    Cat {
        "id": 666,
        "name": "garfield"
    },
    Cat {
        "id": 777,
        "name": "doreamong"
    }
]

Last updated