title: In Oracle PL/SQL, How do I check if a JSON object contains an element of a specific key
body: <p>I have a procedure as shown below. It accepts a JSON object as an input. One of the elements in this object type is an array with the key <code>samplekey</code>. In some cases, the JSON object <code>p_object</code> does not contain the <code>samplekey</code> array. In those instances, the procedure encounters a runtime exception. What is the best way to handle this scenario in PL/SQL? Should I have to check for the existence of an element with key <code>samplekey</code> in the object <code>p_object</code> first? If yes, how do I do this? Is there a better way to handle such scenarios?</p>
  <pre><code>procedure(p_object in json_object_t)
  as
  
  lja json_array_t;
  
  begin
  
  lja   := p_object.get_array('samplekey');
  
  end;
  </code></pre>