title: SerenityRest Filter Response Body
body: <p>I am trying to return the value "Welcome!" where the object contains "name" key that equals to "Subject". The response body data is as follows:</p>
  
  <pre><code>"payload": {
      "mimeType": "multipart/alternative",
      "headers": [
         {
              "name": "Mime-Version",
              "value": "1.0"
          },
          {
              "name": "Subject",
              "value": "Welcome!"
          },
          {
              "name": "To",
              "value": "Jane Doe &lt;xyz@xyz.com&gt;"
          },
          {
              "name": "Message-ID",
              "value": "&lt;123456.abc.com&gt;"
          }
  </code></pre>
  
  <p>The following snippet will return the first encountered "value": "1.0", but i need to get the value where name = "Subject". How can i filter the results and check for a matching string?</p>
  
  <pre><code>Response response = SerenityRest.rest()
     .contentType("application/json")
     .get("URL")
  response.then().statusCode(200);
  String subject = response.jsonPath().getString("payload.headers.value");
  </code></pre>
  
  <p>The value "Welcome" is not static but "name": "Subject" will never change.</p>