I want put element but my key is dynamic.
{ "123" : { "S" : "15/15" }, "124" : { "S" : "0/15" } }
123
and 124
are any id generate
let id1 = uuidv1();
let id2 = uuidv1();
var params = {
Item: {
id: uuidv1(),
exercises: {id1 : "0/15", id2 : "0/15"},
status: "in progress"
},
TableName: "myTablle"
};
but the result in data base is:
{ "id1" : { "S" : "15/15" }, "id2" : { "S" : "0/15" } }
how to replace id1
and id2
by the values of id1
and id2
?