I have a json like below:
{"widget": {
"debug": "on",
"window": {
"title": "SampleWidget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}}
I need to have all the key value pair extracted. e.g. debug=on,title=SampleWidget,name=main_window
and so on.
How can I do this in generic way? I mean the json can be any other than the one in example but procedure should be the same.