Is there a way to pass an array or object through an attribute? like:
<div id="myelem" myattr="{ title: 'hello', author: 'mike'}, { title: 'world', author: 'hellen'}, {...}"/>
I just tried this using javascript, but only the first object are being returned, i would like to have something like this:
for(let i=0; i<this.myattr.length; i++){
console.log(this.myattr.title);
}
Any ideas? Thankyou