Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 16065

VS 2008 Getting Data from a Json array

$
0
0
Hi Everyone,

I hope someone can explain something for me

I have the following JSON data that is sent from my supplier


Code:

{
  "balances": {
    "currency": "GBP",
    "issuerTotals": {},
    "totalAmount": 0,
    "totalRefundsAmount": 0,
    "totalRefundsCount": 0,
    "totalSalesAmount": 0,
    "totalSalesCount": 0,
    "totalCashbackAmount": 0,
    "totalCashbackCount": 0,
    "totalGratuityAmount": 0,
    "totalGratuityCount": 0,
    "totalsSince": "15/07/21 17:10",
    "waiterTotals": {}
  },
  "banking": {
    "Cardnet MS": {
      "currency": "",
      "currentSessionIssuerTotals": {},
      "previousSessionIssuerTotals": {},
      "currentSessionTotals": {
        "currency": "",
        "totalAmount": 0,
        "totalRefundsAmount": 0,
        "totalRefundsCount": 0,
        "totalSalesAmount": 0,
        "totalSalesCount": 0
      },
      "previousSessionTotals": {
        "currency": "",
        "totalAmount": 0,
        "totalRefundsAmount": 0,
        "totalRefundsCount": 0,
        "totalSalesAmount": 0,
        "totalSalesCount": 0
      },
      "currentSessionTransactionNumbers": [
        "",
        ""
      ],
      "previousSessionTransactionNumbers": [
        "",
        ""
      ]
    }
  },
  "reportLines": [
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "END OF DAY"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "Z BALANCES"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "Totals reset"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "Thank you"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "15/07/21 17:17"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "HANDSET:01"
    },
    {
      "format": [],
      "type": "LINE_SEPARATOR_DOUBLE",
      "value": "========"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "GRAND TOTALS"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "Since 15/07/21 17:10"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_HEIGHT"
      ],
      "type": "TEXT",
      "value": "No Business"
    },
    {
      "format": [],
      "type": "LINE_SEPARATOR_DOUBLE",
      "value": "========"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "REPORT COMPLETE"
    },
    {
      "format": [],
      "type": "TICKET_FEED",
      "value": "\n\n\n\n\n"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "END OF DAY"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "BANKING    "
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "  "
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_HEIGHT"
      ],
      "type": "TEXT",
      "value": "Algpos                  "
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_HEIGHT"
      ],
      "type": "TEXT",
      "value": "NN4 6EP"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "Thank you"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "TID:22165264"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "15/07/21 17:17"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "HANDSET:01"
    },
    {
      "format": [],
      "type": "LINE_SEPARATOR_DOUBLE",
      "value": "========"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "Cardnet MS"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "TOTALS CONFIRMED"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "15/07/21 17:17"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "CURRENT SESSION:      0"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_HEIGHT"
      ],
      "type": "TEXT",
      "value": "No Business"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "PREVIOUS SESSION:"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "No Business"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "TXN 0094"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "COMPLETED"
    },
    {
      "format": [],
      "type": "TEXT",
      "value": "DIAG 3576"
    },
    {
      "format": [],
      "type": "LINE_SEPARATOR_DOUBLE",
      "value": "========"
    },
    {
      "format": [
        "BOLD",
        "DOUBLE_WIDTH"
      ],
      "type": "TEXT",
      "value": "REPORT COMPLETE"
    }
  ],
  "reportTime": "2021-07-15T17:17:00",
  "reportType": "END_OF_DAY",
  "reportResult": "COMPLETED",
  "notifications": [
    "REPORT_FINISHED",
    "REPORT_STARTED"
  ],
  "userMessage": ""
}

What I would like explained please is how do I get the data from the sub Functions. (when I mean sub functions i mean for example

Code:

"notifications": [
    "REPORT_FINISHED",
    "REPORT_STARTED"
  ]

or everything that is under the "reportLines" header

I would apreachate any advice anyone can give me

Viewing all articles
Browse latest Browse all 16065

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>