python 3.x - Filter elements within object in DynamoDB -
i have dynamodb table contains objects looking following:
{ 'username': ..., 'subscriptions': [ ... ], ... }
and filter subscriptions each user based on criteria, , objects have subscriptions matching criteria, filter objects matching subscriptions present.
if user has subscribed 50 things, 3 of them match, object `subscriptions' field 3 elements long. need other information contained in object.
to give more specific example, suppose have 2 elements in table:
{ 'username': 'alice', 'subscriptions': [ 1, 2 ], 'email': 'alice@a.com' }, { 'username': 'bob', 'subscriptions': [ 2, 3 ], 'email': 'bob@a.com' }
and filter subscription `1'. back
{ 'username': 'alice', 'subscriptions': [ 1 ], 'email': 'alice@a.com' }
or perhaps other structure contains necessary information (and no other information in order save bandwidth).
i believe can scan(), not know specifics.