2021-04-28

json to html with javascript or jquery [closed]

Hello my programmer friends. Do not be tired :‌)

I want tag attributes like Support : (data-example, data-link, ...) custome attributes

I want to turn json into an HTML example of my json :

{"<>":"div","content":["hello",{"<>":"span","content":["Hello"],"attrs":{"class":"color-red"}}],"attrs":{"class":"flex"}}

And now this is the output I expect :

<div class='flex'>hello<span class='color-red'>Hello</span></div>

It will be very good with jquery, but there is no problem without jquery

Please help me, thank you


from Recent Questions - Stack Overflow https://ift.tt/3dX11WV
https://ift.tt/eA8V8J

No comments:

Post a Comment