title: How to find an element in one of several MongoDBs subdocuments
body: <p>I have a mongodb collection that contains documents that contain a subdocument with the following form:</p>
  
  <pre><code>    'Store': {   'cupboard1': {   'Cheese': 21,
                                'Humous': 25,
                                'Natchos': 10,
                                'Olives': 10,
                                'stockItems': 66},
                    'cupboard2': {  'Cheese': 11,
                                'Humous': 9,
                                'Olives': 2,
                                'Sausage': 3,
                                'stockItems': 25},
                    'whole':  {  'Chris': 32,
                                'Olives': 11,
                                'Sausage': 3,
                                'Humous': 34,
                                'Natchos': 10,
                                'stockItems': 91}
  </code></pre>
  
  <p>I want to build a number of queries that depend upon finding documents based on a name of a food item (using python3/Pymongo).
  I can see that I could initially perform a search on the 'whole' subdocument, to get data on documents that match. But, how can I write a query to find details of which cupboards I can find an item in?
  Also, is there a more direct way to find the cupboard? ie if I know I want to find sausage but don't know which if any cupboards it might be found in?</p>