I wonder if it's possible to create an index that could look like this
{
"dispenserId": "my-dispenser-123", // primary key
"users": ["user5", "user12"],
"robotId": "my-robot-1",
"enabled": true,
"side": left
}
Based on my DynamoDB documents that look like this
{
"robotId": "my-robot-1", // primary key
"dispensers": {
"left": "left-dispenser-123",
"right": "right-dispenser-123",
"users": ["user5", "user12"]
},
"enabled": true,
"users": ["user1", "user32"]
}
I can't figure out how to point at either dispensers.left or dispensers.right and use that as a key, neither can I figure out how to make a side: left/right attribute based on the path of the dispenser ID.
Can it be achieved with the current structure? If not, what document structure would you guys suggest instead. which allows me to hold the same data?