title: pact: how to check a a field in the response that may or may not exist
body: <p>I have a service that will respond to a request with a json blob, such as this:</p>
  
  <pre><code>{
    "field1": 1,
    "field2": "2",
    "array": [1,2,3]
  }
  </code></pre>
  
  <p>I know that I can test <code>array</code> by using <code>EachLike</code>, like this:</p>
  
  <pre><code>expected = {
    "field1": Like(1),
    "field2": Like("2"),
    "array": EachLike(1)
  }
  </code></pre>
  
  <p>The issue is that "array" is an optional field in the response. It may not exist at all, and if it doesn't, I still need the contract to validate.  How do I define that a field in the response body must match a type if it exists, but that it may not exist at all?</p>