I am having an issues with understanding does dynamoDb supports filtering by object properties nested in array. Example:
Consider that we have following table called "Street" where one item (row) in that table have following structure:
{
name: "Street name",
population: 20,
houses: 5,
people: [
{
first_name: "FName1",
last_name: "LName1",
... other person's properties
},
{
first_name: "FName2",
last_name: "LName2",
... other person's properties
},
{
first_name: "FName3",
last_name: "LName3",
... other person's properties
}
... etc
]
}
We can consider in this scenario that "name" is dynamodb prefix = which means that we can query based on the street name.
I am interested does dynamodb supports following logic: "Query based on street with specific name and filter it for the person with following specific name."
The result would be something like (whole point is to return only one person/object from array which match the filter)
{
name: "Street nameX",
population: 20,
houses: 5,
people: [
{
first_name: "FNameX",
last_name: "LNameX",
... other person's properties
}
]
}
Basically question is, can dynamoDb filter results after query based on the object properties nested in array.
Please make a note that I understand that I can achieve this with different table schema - but this example is used for simplicity and it is as it is - focusing question on 'does dynamoDB have support for something like this or not?'.