title: extract value from json in oracle
body: <p>For the below possible JSON values in a column, I need to extract value for CAT attribute
  Input Table</p>
  
  <pre><code>|  VALUES                                                    |
  --------------------------------------------------------------
  | {"ANIMALS":"1","DOG":"D1","CAT":"C1"}                      |
  | {"ANIMALS":"2","DOG":"D2","CAT":"C2"}                      |
  | {"ANIMALS":"3","DOG":"D3"}                                 |
  | {"ANIMALS":"4","CAT":"C4", "DOG":"D4"}                     |
  --------------------------------------------------------------
  </code></pre>
  
  <p>NOTE: There could be many other non-ordered attributes as a JSON could.</p>
  
  <p>Expected result</p>
  
  <pre><code>| CAT     |
  -----------
  | C1      |
  | C2      |
  | NULL    |
  | C4      |
  -----------
  </code></pre>
  
  <p>I've been trying to use something like </p>
  
  <p><code>SELECT REGEXP_SUBSTR('{"ANIMALS":"1","DOG":"D1","CAT":"C1"}', 'CAT[^,]+') "REGEXPR_SUBSTR" FROM DUAL;</code></p>
  
  <p>which gives me <code>CAT":"C1"}</code> for the above input which doesn't fulfil my need to fetch the value.</p>