title: How do I query an array of dictionaries in MongoDB?
body: <p>I have an array of dictionaries on which I have to make queries. The queries will be like when "name" is "a" then "value" should be "2".</p>
  
  <pre><code>{
      "t": "m",
      "y": "n",
      "A":[ 
              {
               "name": "x",
               "value": "1"
              },
              {
               "name": "y",
               "value": "2"
              },
              {
               "name": "z",
               "value": "1"
              }
          ]
  }
  </code></pre>
  
  <p>In the above, I want to know what are the records whose "value" is "1" when "name" is x. 
  I also need to make queries like, where "name" is "x" then value should be "2" and "name" is "y" then "value" should be "1"</p>