title: Cypress How can I get length of API response data? Please see github link and image link
body: <p>here is code and <a href="https://github.com/chkashif167/Partie.Tests/blob/master/cypress/integration/1profile/get-parties.counts.profile.spec.js" rel="nofollow noreferrer">https://github.com/chkashif167/Partie.Tests/blob/master/cypress/integration/1profile/get-parties.counts.profile.spec.js</a> and here is result of code <a href="https://www.screencast.com/t/ngRKLRYsc" rel="nofollow noreferrer">https://www.screencast.com/t/ngRKLRYsc</a> but I want compare 46 length with count of parties in UI `</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>describe("Partie Counts Profile Page Test", () =&gt; {
    before(function() {
      cy.SignIn();
      cy.fixture("vars.json").as("vars");
    });
  
    it("Partie Counts", () =&gt; {
      const profileBtn = "div.actions--left &gt; button &gt; img";
  
      ///// I want to get lenght of the parties from the url response and want check with counts in UI
      cy.wait(3000);
      cy.get(profileBtn).click();
      cy.wait(1000);
  
      cy.request(
        "api/v1/room/getUserRooms/d23eef09-e4e1-455d-a74c-03dfc61bde11"
      ).then(response =&gt; {
        cy.log(response.body);
        assert.equal(response.status, 200);
        expect(response.body).to.not.be.null;
        cy.log(response.body.length);
        cy.get("div:nth-child(3) &gt; span.quick-stat-figure").should("contain",response.body.length);
      });
    });
  });</code></pre>
  </div>
  </div>
  </p>