I've some PHP source code that are simple key-value arrays like these:
return array('var1' => 'var2' );
And
return array('sub' => array( 'var1' => 'var2' ) );
And I need to parse them into JavaScript objects, because I've a JavaScript implementation of a PHP library and I want to test the compatibility using the original test cases.
There are over a 100 tests, so manual conversion is not practical.
Is there an easy way to convert these into JavaScript objects without using PHP?