JSON will work perfectly... ideally use a JSON decoder in javascript (Javascript libraries at the bottom) to convert JSON->JS and in PHP use the built-in JSON encode/decode libraries. You can also simply eval() JSON in javascript (it's a valid javascript format) but use of eval is discouraged, and there are some security implications if something dodgy creeps into the variables.
By the way your above statement doesn't have any quotes (can't work with strings). If it was quoted, you'd then have to worry about escaping quotes within the strings.
JSON allows you to pass objects and arrays between JS and various other languages (including PHP, ASP, Perl etc) you don't have to use it for such complicated things but there's a useful case for it. If you create an output object in PHP, you can simply JSON_ENCODE it out to JS, and JSON_DECODE it into a JS object, and access all the properties as you see fit - no need to change the JSON part if you add/remove/rename items inside the output object. It's really obvious to say perhaps but you can only move values over JSON, not functions/methods.