need to iterate thru json

need to iterate thru json

hi..

in the below json i need to get the value of the id==8, but some better way. not thru data[1].children

  1. [
  2. {
  3.     "id" : 1,
  4.     "name" : "a",
  5.     "children" : [
  6.      {
  7.      "id" : 2,
  8.    "name" : "b",
  9.    "children" : [
  10.     {
  11.     "id" : 3,
  12.    "name" : "c",
  13.    "children" : [
  14.     {
  15.     "id" : 4,
  16.    "name" : "d",
  17.    "children" : [
  18.     {
  19.     "id" : 5,
  20.    "name" : "e",
  21.    "children" : [
  22.     {}
  23.    ]
  24.     }
  25.    ]
  26.     }
  27.    ]
  28.     }
  29.    ]
  30.      }
  31.     ] 
  32. },
  33. {
  34.     "id" : 6,
  35.     "name" : "f",
  36.     "children" : [
  37.      {
  38.      "id" : 7,
  39.    "name" : "g",
  40.    "children" : [
  41.     {
  42.     "id" : 8,
  43.    "name" : "h",
  44.    "children" : [
  45.     {
  46.     "id" : 9,
  47.    "name" : "i",
  48.    "children" : [
  49.     {
  50.     "id" : 10,
  51.    "name" : "j",
  52.    "children" : [
  53.     {}
  54.    ]
  55.     }
  56.    ]
  57.     }
  58.    ]
  59.     }
  60.    ]
  61.      }
  62.     ] 
  63. }
  64. ]