The code below will enumerate properties of an object, but can the data types be enumerated?
function enumerateAttributes(node){
var text="";
var attrs=circle1.getAttrs();
for (key in attrs) {
if (attrs.hasOwnProperty(key)) {
text+=(key+"=="+attrs[key]+"\n");
}
}
alert(text);
}
For javascript data types you can use typeof: console.log(typeof attrs[key]);
These are some common types that will be returned: