title: Wildcard in JsonPath
body: <p>I am parsing a JSON like below:</p>
  
  <pre class="lang-json prettyprint-override"><code>jobs1: [
  {
    request: {
      body: {
        jobID: "79ceeeff-53b9-4645-80bd-95dfca6fe1e9",
  ...
  jobs2: [
  {
    request: {
      body: {
        jobID: "60e7c286-f936-4f96-87bc-6bd55f107514",
  </code></pre>
  
  <p>And looking for a way to use wildcards in the JSON path.</p>
  
  <p>I am using the <a href="https://github.com/rest-assured/rest-assured" rel="noreferrer">RestAssured</a> framework in Java. After executing the code like below:</p>
  
  <pre><code>List&lt;String&gt; ids = get("/state/").path("*.request.body.jobID");
  System.out.println(ids);
  </code></pre>
  
  <p>I expect to get:</p>
  
  <pre><code>[79ceeeff-53b9-4645-80bd-95dfca6fe1e9, 60e7c286-f936-4f96-87bc-6bd55f107514]
  </code></pre>
  
  <p>But instead I get an exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid JSON expression:
  Script1.groovy: 1: unexpected token: *. @ line 1, column 27.
                          *.request.body.jobID
                           ^
  </code></pre>
  
  <p>I have looked through these tutorials, but nothing seemed to work for me:</p>
  
  <p><a href="https://github.com/json-path/JsonPath" rel="noreferrer">https://github.com/json-path/JsonPath</a></p>
  
  <p><a href="http://goessner.net/articles/JsonPath" rel="noreferrer">http://goessner.net/articles/JsonPath</a></p>
  
  <p>How do I correctly use the wildcards in JsonPath?</p>