title: To get the count of key-value occurrence for JSON in java
body: <p>I have a json array as below:</p>
  
  <pre><code>[
    {
      "_id": {
        "$oid": "57833bf8cb3099a383e8e2af"
      },
      "Name": "3GBWS",
      "Version": "QV3.2",
      "Type": "FQGA",
      "SerialNO": "L1D73708884",
      "Location": "TEXAS"
    },
    {
      "_id": {
        "$oid": "5784818bcb30b4918964b50f"
      },
      "Name": "3GBTW",
      "Version": "WN6.0",
      "Type": "FQGW",
      "SerialNO": "O1143734584",
      "Location": "OHIO"
    },
    {
      "_id": {
        "$oid": "5784818bcb30b4918964b50f"
      },
      "Name": "TEXAS",
      "Version": "AS1.0",
      "Type": "FWQA",
      "SerialNO": "DH783708884",
      "Location": "NY"
    },
    {
      "_id": {
        "$oid": "5784818bcb30b4918964b50f"
      },
      "Name": "3GLTS",
      "Version": "WE9.0",
      "Type": "FQGW",
      "SerialNO": "L0943708884",
      "Location": "TEXAS"
    }
  ]
  </code></pre>
  
  <p>My aim is to get output as Texas=2 .</p>
  
  <p>Here I need to get the occurrence of "TEXAS" only under the key "Location".
  Is there any way to compare the key-value pair in java? I tried with <code>int location = Collections.frequency(json_string, "TEXAS");</code> , but this wont consider the key "Location". 
  Please help.</p>