suryakala

Untitled

May 11th, 2017
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. $str1=
  2. {"id":"1","name":"அடகு","tooltip":" ","color":" ","children":[{"id":"2","name":"கொதுவை ","parent":"1","tooltip":" ","color":"#FF0000"},{"id":"3","name":"அடைமானம் ","parent":"1","tooltip":" ","color":"#FF0000"},{"id":"4","name":"பிணையம் ","parent":"1","tooltip":" ","color":"#FF0000"},{"id":"5","name":"ஈடு ","parent":"1","tooltip":" ","color":"#FF0000"},{"id":"6","name":"ஒற்றி ","parent":"1","tooltip":" ","color":"#FF0000"},{"id":"9","name":"கீரைக்கறி ","parent":"1","tooltip":" ","color":"#1E90FF"}]}
  3.  
  4. $str2=
  5.  
  6. //1st set
  7. {"id":"1","name":"குழைவு","tooltip":" ","color":" ","children":[{"id":"2","name":"நெகிழ்கை ","parent":"1","tooltip":" ","color":"#FF0000 "},{"id":"6","name":"அணைவு ","parent":"1","tooltip":" ","color":"#8A2BE2 "},{"id":"7","name":"வளைவு ","parent":"1","tooltip":" ","color":"#0000FF "}]}
  8.  
  9. //2nd set
  10. {"id":"1","name":"ஈடு","tooltip":" ","color":" ","children":[{"id":"2","name":"இடு ","parent":"1","tooltip":" ","color":"#FF0000 "},{"id":"14","name":"பொருத்தம் ","parent":"1","tooltip":" ","color":"#8A2BE2 "},{"id":"18","name":"குழைவு ","parent":"1","tooltip":" ","color":"#008B00 "}]}
  11.  
  12. //3rd set
  13. {"id":"1","name":"அடைமானம்","tooltip":" ","color":" ","children":[{"id":"2","name":"கொதுவை ","parent":"1","tooltip":" ","color":"#FF0000 "},{"id":"3","name":"ஈடு ","parent":"1","tooltip":" ","color":"#FF0000 "},{"id":"4","name":"அடகு ","parent":"1","tooltip":" ","color":"#FF0000 "}]}
  14.  
  15.  
  16.  
  17.  
  18. Expected Output
  19.  
  20. {
  21. "id":"1",
  22. "name":"அடகு",
  23. "tooltip":" ",
  24. "color":" ",
  25. "children":[
  26. {
  27. "id":"2",
  28. "name":"கொதுவை",
  29. "parent":"1",
  30. "tooltip":" ",
  31. "color":"#FF0000"
  32. },
  33. {
  34. "id":"1",
  35. "name":"அடைமானம்",
  36. "tooltip":" ",
  37. "color":" ",
  38. "children":[
  39. {
  40. "id":"2",
  41. "name":"கொதுவை ",
  42. "parent":"1",
  43. "tooltip":" ",
  44. "color":"#FF0000 "
  45. },
  46. {
  47. "id":"1",
  48. "name":"ஈடு",
  49. "tooltip":" ",
  50. "color":" ",
  51. "children":[
  52. {
  53. "id":"2",
  54. "name":"இடு ",
  55. "parent":"1",
  56. "tooltip":" ",
  57. "color":"#FF0000 "
  58. },
  59. {
  60. "id":"1",
  61. "name":"குழைவு",
  62. "tooltip":" ",
  63. "color":" ",
  64. "children":[
  65. {
  66. "id":"2",
  67. "name":"நெகிழ்கை ",
  68. "parent":"1",
  69. "tooltip":" ",
  70. "color":"#FF0000 "
  71. },
  72. {
  73. "id":"6",
  74. "name":"அணைவு ",
  75. "parent":"1",
  76. "tooltip":" ",
  77. "color":"#8A2BE2 "
  78. },
  79. {
  80. "id":"7",
  81. "name":"வளைவு ",
  82. "parent":"1",
  83. "tooltip":" ",
  84. "color":"#0000FF "
  85. }
  86. ]
  87. },
  88. {
  89. "id":"14",
  90. "name":"பொருத்தம் ",
  91. "parent":"1",
  92. "tooltip":" ",
  93. "color":"#8A2BE2 "
  94. },
  95. {
  96. "id":"18",
  97. "name":"குழைவு ",
  98. "parent":"1",
  99. "tooltip":" ",
  100. "color":"#008B00 "
  101. }
  102. ]
  103. },
  104. {
  105. "id":"4",
  106. "name":"அடகு ",
  107. "parent":"1",
  108. "tooltip":" ",
  109. "color":"#FF0000 "
  110. }
  111. ]
  112. },
  113. {
  114. "id":"4",
  115. "name":"பிணையம் ",
  116. "parent":"1",
  117. "tooltip":" ",
  118. "color":"#FF0000"
  119. },
  120. {
  121. "id":"6",
  122. "name":"ஒற்றி ",
  123. "parent":"1",
  124. "tooltip":" ",
  125. "color":"#FF0000"
  126. },
  127. {
  128. "id":"9",
  129. "name":"கீரைக்கறி ",
  130. "parent":"1",
  131. "tooltip":" ",
  132. "color":"#1E90FF"
  133. }
  134. ]
  135. }
Add Comment
Please, Sign In to add comment