我有以下JSON数据数组。有两个根节点,然后有根节点的子节点和子节点的子节点。我需要找到根节点有多少个子节点。我不知道该怎么做。
[
{
"Id": "0",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
"Events": [
{
"Id": "0",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
},
{
"Id": "1",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
}
],
"Actions": null
},
{
"Id": "1",
"Name": "Suscriber 1"
"Events": [
{
"Id": "0",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
},
{
"Id": "1",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
}
],
"Actions": null
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
},
{
"Id": "1",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
"Events": [
{
"Id": "0",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
},
{
"Id": "1",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
}
],
"Actions": null
},
{
"Id": "1",
"Name": "Suscriber 1"
,
"Events": [
{
"Id": "0",
"Name": "Subscriber"
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
},
{
"Id": "1",
"Name": "Subscriber
"Suscribers": [
{
"Id": "0",
"Name": "Suscriber 1"
},
{
"Id": "1",
"Name": "Suscriber 1"
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
}
],
"Actions": null
}
],
"Actions": [
{
"Name": "Start",
"Text": "Abc"
},
{
"Name": "Start",
"Text": "Abc"
}
]
}
]