Convert JSON string to HTML or CSS
npm install json2htmljson2css
makeHTML = require('json2htmljson2css').makeHTML;var htmlObj = [{
tag : "ux-button",
attr : {
"id" : "form_field_holder_",
"class" : "form_field_holder"
},
content : [{
tag : "select",
attr : {
"id" : "form_dropdown_",
"class" : "form_dropdown",
"name" : 'data[ElSubmissionFormItem][custom_fields]'
},
content : 'some content'
}]
}];
var output = makeHTML(htmlObj);
`
will output
`
``