Forum Discussion

  • nmrao's avatar
    nmrao
    Champion Level 3
    The question is too generic. Would you mind providing same input data and expected output data?
    • khalni02's avatar
      khalni02
      New Contributor

      I have two responses one is Web Service Response:

      {
      "summary": {
      "apiVersion": "V1",
      "apiName": "GetDataContextReferences"
      },
      "errors": null,
      "action": "COMPLETE",
      "warnings": null,
      "dataContextReference": [
      {
      "id": 2,
      "name": "LIVE"
      },
      {
      "id": 3,
      "name": "STAGING"
      },
      {
      "id": 1,
      "name": "DRAFT"
      },
      {
      "id": 4,
      "name": "ARCHIVE"
      }
      ]
      }

       

      2. JDBC Response 

      <Results>
      <ResultSet fetchSize="0">
      <Row rowNumber="1">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>2</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>LIVE</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="2">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>3</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>STAGING</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="3">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>1</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>DRAFT</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="4">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>4</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>ARCHIVE</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      </ResultSet>
      </Results><Results>
      <ResultSet fetchSize="0">
      <Row rowNumber="1">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>2</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>LIVE</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="2">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>3</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>STAGING</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="3">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>1</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>DRAFT</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      <Row rowNumber="4">
      <DATA_CONTEXT_REFERENCE_LOOKUP.ID>4</DATA_CONTEXT_REFERENCE_LOOKUP.ID>
      <DATA_CONTEXT_REFERENCE_LOOKUP.NAME>ARCHIVE</DATA_CONTEXT_REFERENCE_LOOKUP.NAME>
      </Row>
      </ResultSet>
      </Results>

       

      How can I write a groovy script to match theses two outputs?