title: How to model named array in Lambda DSL for Pact (pact-jvm-consumer)
body: <p>My json has one key value pair and the value is an array of multiple objects. How can i model this with pact lambdaDSL? Example-</p>
  <pre><code>{
      &quot;key&quot;: [
          {
              &quot;isCurrent&quot;: false,
              &quot;createdBy&quot;: &quot;admin&quot;,
          },
          {
               &quot;isCurrent&quot;: false,
              &quot;createdBy&quot;: &quot;userA&quot;,
          }
      ]
  }
  </code></pre>
  <p>I have written a lambda model like:</p>
  <pre><code>LambdaDsl.newJsonBody((o) -&gt; {
                  o.array(&quot;versionHistoryData&quot;,  (a) -&gt; {
                              a.object((ao) -&gt; {
                                  ao.booleanType(&quot;isCurrent&quot;, false);
                                   ao.booleanType(&quot;createdBy&quot;,&quot;User&quot;);
                              });
                          });
  </code></pre>
  <p>However i get the error:</p>
  <blockquote>
  <p>Expected a List with 1 elements but received 2 elements</p>
  </blockquote>
  <p>I see that there is a minArrayLike method but it doesn't allow to give example for object keys. How can i model this?</p>