Determine if variable is defined in Python
How do I convert an object to an array?
Jquery, ajax, javascript - getting an element by id