<input type="text" data-setup='{ "method" : "checkbox" }'>
var a = document.querySelectorAll('[data-setup]')
for (var i=0;i<a.length;i++) {
alert(a[i].getAttribute('data-setup'));
}
ALERT: { "method" : "checkbox" }
for (var i=0;i<a.length;i++) {
var obj = JSON.parse(a[i].getAttribute('data-psswrd'));
alert(obj.method); //will alert what was in the method property
console.log(obj); // should log a proper object
}
var myJSON = JSON.parse( a[i].getAttribute('data-psswrd') );
alert( myJSON );