title: How to check if key exists or not using json-path library?
body: <p>I'm using <a href="https://mvnrepository.com/artifact/io.rest-assured/json-path/4.1.2" rel="nofollow noreferrer">Json Path</a> library and I want to check if key exists or not and based on that I'll do some actions. Hence I wrote following code -</p>
  
  <pre><code>for(int i = 0; i &lt; keyValues.length; i++) {
    List&lt;String&gt; invalidKeys = new ArrayList&lt;&gt;();
  
    if(Objects.isNull(jsonPath.getString(key))) {
       invalidKeys.add(key);
       continue;
    }else {
       value = keyValues[i].split("=")[1];
    }
  }
  </code></pre>
  
  <p>My intention to get keys which are not present in json but with this code, if key has value as <code>null</code> that is also treated non-existing key. Is there any way I can modify above code to get only keys which are not present in json?</p>