JSON의 변화를 동적으로 분석하는 방법 I 동적 아래 예AngularJS와
예 1에서와 같이 JSON 변화 가지고
"Flower":{
"color": "red"
}
예 2
"Flower":{
"color": "red" ,
"seasonal": "yes"
}
예 3
"Flower":{
"color": "red" ,
"seasonal": {
"seasons":{
"winter": "yes",
"summer" : "no"
}
}
}
위의 예제 출력은 다음과 같아야합니다.
example1 : color:red
example2 :color:red,seasonal:yes
example3: color:red,seasonal.seasons.winter:yes,seasonal.seasons.summer:no
문제는 매번 나오는 것을 모릅니다. 출력 형식이어야합니다. 나는 각도
구조가 무엇이 될지 전혀 모른다면 재귀를 사용할 수 있습니다. – nikjohn