formationList
Spec
formationList<TSource>(
source: TSource[],
TClass: ClassCapture<TSource>
): { L: ListAttributeValue }
Convert Array<TSource>
to AttributeValue(L).
Input
Name
Type
Information
source
TSource[]
Array to convert to AttributeValue(L).
TClass
ClassCapture<TClass>
Reference of TClass
.
Example
const dynamo: AttributeValue = Mapper.formationList(
[
{ id: 666, name: "garfield" },
{ id: 777, name: "doraemong" }
],
Cat
);
It will be formationed as,
{
"L": [
{
"M": {
"id": {
"N": "666"
},
"name": {
"S": "garfield"
}
}
},
{
"M": {
"id": {
"N": "777"
},
"name": {
"S": "doraemong"
}
}
}
]
}
Last updated
Was this helpful?