title: Matching data in JsonPath with wiremock
body: <p>I'm trying to create mocks for my login procedure. I use POST method with a couple of fields and login object (with login, password, etc.)
  For that I'm using JsonPath. Code below:</p>
  
  <pre><code>{
  "request": {
          "method": "POST",
          "url": "/login",
          "bodyPatterns" : [
                  {"matchesJsonPath" : "$.method"},
                  {"matchesJsonPath" : "$.params[?(@.clientVersion == "1")]"},
                  {"matchesJsonPath" : "$.params.login"},
                  {"matchesJsonPath" : "$.params.password"}
           ]
      },
      "response": {
              "status": 200,
              "bodyFileName": "login.json"
      }
  }
  </code></pre>
  
  <p>I'm checking the clientVersion because it's similar to the examples. </p>
  
  <p>My problem is, that with te given POST JSON:</p>
  
  <pre><code>{
      "method": "login",
      "params": {
          "clientVersion": "1",
          "login": "test@test.com",
          "password": "681819535da188b6ef2"
      }
  }
  </code></pre>
  
  <p>I receive 404.
  However, when I change</p>
  
  <pre><code>{"matchesJsonPath" : "$.params[?(@.clientVersion == "1")]"},
  </code></pre>
  
  <p>to normal</p>
  
  <pre><code>{"matchesJsonPath" : "$.params.clientVersion"},
  </code></pre>
  
  <p>everything works just fine.</p>
  
  <p>So - how to check inside wiremock, using matchesJsonPath if given field equals some value?
  How to apply it to the root field like method in my case?
  And while we're at it - I had similar problems with checking if the value is not null. I tried to apply regular expressions and such - no luck.</p>