I've been Googling for this for last 2 days. I couldn't get it done perfectly.
I assume, this belongs or can be done by some template engines, but.. I was not able to find that so-called engine.
I have this JSON array and I'd like to parse it back or convert it to plain HTML to output it to the browser.
[
{
"tag": "figure",
"children": [
{
"tag": "div",
"attrs": {
"class": "fiwrapper"
},
"children": [
{
"tag": "img",
"attrs": {
"src": "/media/images/5cbd41bd7c566057f5e6a875.jpeg"
}
}
]
},
{
"tag": "figcaption",
"children": [
""
]
}
]
},
{
"tag": "p",
"children": [
{
"tag": "br"
}
]
},
{
"tag": "figure",
"children": [
{
"tag": "div",
"attrs": {
"class": "fiwrapper"
},
"children": [
{
"tag": "img",
"attrs": {
"src": "/media/images/5cbd45286c7210581c5563ba.jpeg"
}
}
]
},
{
"tag": "figcaption",
"children": [
""
]
}
]
},
{
"tag": "p",
"children": [
{
"tag": "br"
}
]
},
{
"tag": "p",
"children": [
"Cool Stuff.."
]
}
]
Help is more than appreciated..