title: Postgres full text search on json
body: <p>I am dumping a json value into <code>text</code> field as I have some invalid json data that cannot be stored in <code>json</code>/<code>jsonb</code>. I would like to search and highlight <code>"Value16": 16711680</code> in the following example, but I am also getting a hit on <code>"Value20": 16711680</code>.</p>
  
  <pre><code>{
    "Value01": 122,
    "Value02": 25,
    "Value03": 9,
    "Value04": 538,
    "Value05": false,
    "Value06": 65534,
    "Value07": 2,
    "Value08": 0,
    "Value09": 2,
    "Value10": 1,
    "Value11": 0,
    "Value12": 0,
    "Value13": false,
    "Value14": 0,
    "Value15": 0,
    "Value16": 16711680,
    "Value17": 0,
    "Value18": 0,
    "Value19": 0,
    "Value20": 16711680,
    "Value21": 0,
    "Value22": 0
  }
  </code></pre>
  
  <p>I tried following queries but did not work. Do I need to use any escape characters here?</p>
  
  <p><code>to_tsquery('Value16&lt;-&gt;16711680')</code></p>
  
  <p><code>to_tsquery('Value16&amp;16711680')</code></p>
  
  <p>Basically I would like to hit only if key and value match <em>together</em>.<br>
  How to search for a key/value pair in the json text?</p>