title: How to get only the jsonb of specific keys from postgres?
body: <p>I'm aware that you can remove keys from a jsonb in postgres using something like this</p>
  <pre><code>select '{&quot;a&quot;: 1, &quot;b&quot;: 2, &quot;c&quot;:3}'::jsonb -'a';
   ?column?
  ----------
  {&quot;b&quot;: 2 &quot;c&quot;:3}
  (1 row)
  </code></pre>
  <p>Is there a way to only grab specific keys? Like let's say I just want to get the key-value pair of just the <code>'a'</code> key.</p>
  <p>Something like this?</p>
  <pre><code>select '{&quot;a&quot;: 1, &quot;b&quot;: 2}'::jsonb + 'a' + 'b';
   ?column?
  ----------
  {&quot;a&quot;: 1, &quot;b&quot;: 2}
  (1 row)
  </code></pre>
  <p>EDIT: Changed the example to to show that I'd like to grab multiple keys-value pairs from the jsonb and not just one pair.</p>