How can I get a string representation of an object ? For example: -- For an element's style, it would be something like: "{'color':'red', 'fontSize':16}" -- For an array ['aaa', 2], get: "['aaa', 2]" (this is relative easier, except that getting the quotation mark around aaa right could be a nightmare.)