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.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo