Have a requirement of transferring the LastEvaluatedKey returned from the query output as the response of a paginated API call so that the users can request the next page with the LastEvaluatedKey. Is it possible to convert with aws-sdk-go-v2 ?
Have tried to marshal and unmarshal using json but it was not working
lek := map[string]types.AttributeValue{
"num": &types.AttributeValueMemberN{Value: "1"},
"text": &types.AttributeValueMemberS{Value: "text"},
}
barray, err := json.Marshal(lek)
if err != nil {
fmt.println(err)
}
lekDecoded := map[string]types.AttributeValue{}
err = json.Unmarshal(barray, &lekDecoded)
if err != nil {
fmt.println(err)
}
This always keeps failing to decode it back to map[string]types.AttributeValue