0

I'm just moving from PHP to ASP.NET (C#) and new to JSON

I have a following JSON structures and please help me out

{
  "success": true,
  "table1": {
    "2452661641": {
      "id": "2452661641",
      "class": "990767496",
      "amount": "1"
    },
    "2452069440": {
      "id": "2452069440",
      "class": "469523518",
      "amount": "1"
    }
    ...etc
  "table2": {
    "abc": {
      "id": "2452661641",
      "class": "990767496",
      "amount": "1"
    },
    "xyz": {
      "id": "2452069440",
      "class": "469523518",
      "amount": "1"
    }
    ...etc
}

I just want to get only datas from node "table2" and bind it to a Dataset or Datatable like this:

Row 1: abc | 2452661641 | 990767496 | 1
Row 2: xyz | 2452661640 | 469523518 | 1

Thanks in advance!

  • have you tried a google search on how to deserialize JSON Data using C#. if you are using `Json.Net` please consult with their online documentation and or examples try this msdn posting for some ideas https://msdn.microsoft.com/en-us/library/hh674188.aspx – MethodMan May 26 '15 at 17:29
  • I ALMOST flagged this as a duplicate, this has certainly been asked / answered in a more basic scenario many times, but this question is slightly more specialized than some of the potential duplicates. – user700390 May 26 '15 at 17:46

0 Answers0