A
A
Alexey Gordienko2018-07-26 11:16:59
Amazon Web Services
Alexey Gordienko, 2018-07-26 11:16:59

Is it possible to store an Item in DynamoDB whose value is an array of Jsons?

Is it possible to store data like this?

{
    "table": {
        "some_options": [{
                "param1": "a",
                "param2": "b"
            },
            {
                "param1": "x",
                "param2": "y"
            }
        ]
    }
}

I work with Dynamodb through aws-sdk-cpp. In order to set the value as json, you need to use the
SetM() function, but I can’t figure out how to insert an array of Jsons, because the SetMS() function is missing, and by analogy with other data types, an array must be set thus. Is there any example of how to write data in this format?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2018-07-26
@RdSpclL

Convert your JSON to strings before saving and save as strings. And when selecting, translate the lines into objects.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question