Copy PHP Array to Javascipt Object

I often need to work with data client side that is returned from the server. Found this neat piece of code which I used to get the available mimetypes so I can validate client side that the file the user is attempting to upload is accepted.