I get a array from my database and i m trying to create a element but it's not working. this is my simplify code
var objecthtml = {
id : 1,
html: '<div> </div>',
css: 'colonne'
}
console.log(objecthtml.html);
console.log(objecthtml);
var myArray = [objecthtml];
console.log(myArray);
let block = document.createElement(objecthtml.html);
this is the error message :
InvalidCharacterError: String contains an invalid character
html: 'div'inobjecthtml