使用C#从JSON的节点获取数据

时间:2015-05-26 17:27:51

标签: c# json

我只是从PHP迁移到ASP.NET(C#),而刚刚从JSON转移到

我有以下JSON结构,请帮帮我

{
  "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
}

我只想从节点" table2"中获取数据。并将其绑定到数据集或数据表,如下所示:

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

提前致谢!

0 个答案:

没有答案