小编Lvn*_*vnt的帖子

c# Json get all parent and child values

I have a json string.

There are multiple subcategories within the json string depending on the category. I want to combine them all. It should always give the Id of the last child level of a higher level.

Sample :

Id   - Name
--     ----------
1239 - Accessory> Jewelery > wristband> Silver wristband 
Run Code Online (Sandbox Code Playgroud)

Can anyone help me . Thanks

    {
  "categories": [
    {
      "id": 368,
      **"name": "Accessory ",**
      "parentId": null,
      "subCategories": [
        {
          "id": 396,
          **"name": "Jewelery ",**
          "parentId": 368, …
Run Code Online (Sandbox Code Playgroud)

.net c# json

0
推荐指数
1
解决办法
1467
查看次数

标签 统计

.net ×1

c# ×1

json ×1