Reputation: 92
my dynamodb table contains items like this
I know i can use a projection like:
proj := expression.NamesList(expression.Name("key_Ravenna"))
to filter my results by key, but how can I filter by contents of the maps? e.G. "WHERE LatD == 41"
Appreciate the help, just started migrating my mongodb application to dynamodb
Greetings H.Molnar
Upvotes: 1
Views: 1036
Reputation: 14829
You can access nested elements such as Maps using 'dot' notation:
aws dynamodb scan --table-name YOURTABLE --filter-expression 'key_Reading.Data.LatD = :val' --expression-attribute-values '{":val":{"S":"41"}}'
I've used a scan as an example, which searches across across every item in your table, but you might want a query, only searches across one partition key.
Upvotes: 1