title: Search Postgres JSONB fields
body: <p>I want to search the pattern '%myvalue%' in key and value for a json field, return any one that matched.</p>
  
  <p>I use</p>
  
  <pre><code>select * from dialogue_responses where field_rule like '%myvalue%'
  </code></pre>
  
  <p>it prompts me error </p>
  
  <pre><code>ERROR:  operator does not exist: jsonb ~~ unknown
  LINE 1: select * from dialogue_responses where field_rule like '%auf...
                                                            ^
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
  </code></pre>
  
  <p>What's he correct way of doing this?</p>