title: Search for jsonb concatenated values specified by keys
body: <p>I have jsonb data as :</p>
  
  <pre><code>id | data
  1  | {"last": "smith", "first": "john", "title": "mr"}
  2  | {"last": "smith jr", "first": "john", "title": "mr"}
  3  | {"last": "roberts", "first": "Julia", "title": "miss"}
  4  | {"last": "2nd", "first": "john smith", "title": "miss"}
  </code></pre>
  
  <p>I need to search for records which match with "John smith"; So, in this case IDs - 1,2,4
  I cannot separate the search for each key => value pair; I need to get concatenated entry for records to check against incoming request.</p>
  
  <p>I have tried </p>
  
  <pre><code>select * from contacts where jsonb_concat(data-&gt;&gt;'title'::TEXT || data-&gt;&gt;'first'::TEXT || data-&gt;&gt;'last'::TEXT) ilike "John smith";
  </code></pre>
  
  <p>This doesn't work because I am trying to concat values and not jsonb object. Is there any way to concat jsonb values specified by keys?</p>