Im trying to use xe6 rest client, rest response, and ultimately datasetapater to move rest reponce into table. My repsonse is json and consist of multiple checks with multiple lineitems in them ( thin restaurant resciept) . A single check looks like the blow Json. I want and need only the lineItems. But everything i have tried returns the checks and lineitesm which them results in only the checks getting in to the table. I thought if i add rootelement=eleememts it might help and it accepts that but still returs checks also. I tired rootelemen=lineItems and everything else i could think of. How would I go about getting the lineItems into their own tdataset or a response that is lineitems only? Please..

Im trying to use xe6 rest client, rest response, and ultimately datasetapater to move rest reponce into table.  My repsonse is json and consist of multiple checks with multiple lineitems in them ( thin restaurant resciept) .   A single check looks like the blow Json.  I want and need only the lineItems.  But everything i have tried returns the checks and lineitesm which them results in only the checks getting in to the table.  I thought if i add rootelement=eleememts it might help and it accepts that but still returs checks also. I tired rootelemen=lineItems and everything else i could think of.  How would I go about getting the lineItems into their own tdataset or a response that is lineitems only?  Please.. 

{
  "elements": [
    {
      "href": "https://www.clover.com/v3/merchants/ANNM2S72V6HNW/orders/95XQ975HW8T1G",
      "id": "95XQ975HW8T1G",
      "currency": "USD",
      "employee": {
        "id": "KF4BYDKE1KB1W"
      },
      "total": 3830,
      "title": "22",
      "orderType": {
        "id": "JD48NRJ25STVT"
      },
      "taxRemoved": false,
      "isVat": false,
      "state": "locked",
      "manualTransaction": false,
      "groupLineItems": true,
      "testMode": false,
      "payType": "FULL",
      "createdTime": 1407696203000,
      "clientCreatedTime": 1407696203000,
      "modifiedTime": 1407696237000,
      "lineItems": {
        "elements": [
          {
            "id": "DCZ9H297Z49E0",
            "item": {
              "id": "BD6PXY8Y1GT9R"
            },
            "name": "Amstel 16oz",
            "alternateName": "",
            "price": 766,
            "printed": false,
            "createdTime": 1407696209000,
            "exchanged": false,
            "refunded": false,
            "isRevenue": true
          },
          {
            "id": "1N23MFN6EC792",
            "item": {
              "id": "BD6PXY8Y1GT9R"
            },
            "name": "Amstel 16oz",
            "alternateName": "",
            "price": 766,
            "printed": false,
            "createdTime": 1407696223000,
            "exchanged": false,
            "refunded": false,
            "isRevenue": true
          },
          {
            "id": "DEKXYX4TDGZJ8",
            "item": {
              "id": "BD6PXY8Y1GT9R"
            },
            "name": "Amstel 16oz",
            "alternateName": "",
            "price": 766,
            "printed": false,
            "createdTime": 1407696223000,
            "exchanged": false,
            "refunded": false,
            "isRevenue": true
          },
          {
            "id": "QFAK4CTMGWGRG",
            "item": {
              "id": "BD6PXY8Y1GT9R"
            },
            "name": "Amstel 16oz",
            "alternateName": "",
            "price": 766,
            "printed": false,
            "createdTime": 1407696223000,
            "exchanged": false,
            "refunded": false,
            "isRevenue": true
          },
          {
            "id": "MN6YKPJ4WSEQT",
            "item": {
              "id": "BD6PXY8Y1GT9R"
            },
            "name": "Amstel 16oz",
            "alternateName": "",
            "price": 766,
            "printed": false,
            "createdTime": 1407696224000,
            "exchanged": false,
            "refunded": false,
            "isRevenue": true
          }
        ]
      }
    }
  ],
  "href": "https://www.clover.com/v3/merchants/ANNM2S72V6HNW/orders?filter=clientCreatedTime%3E1407609478000&limit=100"
}

Comments

  1. Ty Brett, im am reading the links and looking at the code now.

    ReplyDelete
  2. They link to the rest deno ive reviewed before.  Unfortunately its very basic and the json is not nested. I have item records withing check records and can make it get th echecks but not the items.  It may come down to parsing it by hand but the tjosndatasetadapter looked much cleaner if i can figure out how to configure it to process only the items or perhaps one dataasrt for items one for checks but so far I cannot seem to do that.  I'll play with yoru sample code.  thanks again.

    ReplyDelete

Post a Comment