In javascript you can easily create objects and Arrays like so:
var aObject = { foo:\'bla\', bar:2 }; var anArray = [\'foo\', \'bar\', 2];
For simple objects, you can use the associative array syntax and casting to get an object:
'bar'); echo $obj->foo; // yields "bar"
But looking at that you can easily see how useless it is (you would just leave it as an associative array if your structure was that simple).