Home > front end >  An analysis of the problem of the json data
An analysis of the problem of the json data

Time:03-22

The following json, want to determine the corresponding node by id below children inside have content or have children

 
//analog data 1
, data1=[{
Title: 'jiangxi'
, id: 1
Children: [{
Title: 'the nanchang'
, id: 1000
Children: [{
Title: 'qingshan lake area'
, id: 10001
}, {
Title: 'high-tech'
, id: 10002
}]
}, {
Title: 'jiujiang'
, id: 1001
}, {
Title: 'ganzhou'
, id: 1002
}]
}, {
Title: 'guangxi'
, id: 2
Children: [{
Title: 'nanning'
, id: 2000
}, {
Title: 'guilin'
, id: 2001
}]
}, {
Title: 'shaanxi'
, id:
Children: [{
Title: 'xi 'an'
, id: 3000
}, {
Title: 'yan'
, id: 3001
}]
}]
  • Related