JSON is not an object, but a string, which stands for JavaScript Object Notation. What you have seems to be a POJO, or Plain Old JavaScript Object, colloquially. These are two different things - JSON being a data exchange format similar to YAML or XML, while a POJO represents an actual object with properties and values.
Your POJO contains JSON values, but as it's already an object, using JSON.parse on the entire object will result in an error due to coercion of the argument to a string:
var foo = {};
JSON.parse(foo); // Essentially equals foo.toString(), resulting in "[object Object]"
JSON.parse('{}'); // This would successfully parse an empty object as it's a string
The error message mentioning the "o" occurs when trying to parse "[object Object]", where an unquoted character leads to the error.
To represent your example as valid JSON, it should be written like this:
var json = '{"array1":["x1","x2"],"array2":["a1","a2"]}';
var x = JSON.parse(json);
document.write('<pre>' + JSON.stringify(x, null, 4) + '</pre>');
Having real JSON values now allows us to address your original question:
var json = '{"array1":["x1","x2"],"array2":["a1","a2"]}';
var x = JSON.parse(json);
var vals = Object.keys(x).sort().reduce(function (arr, key) {
arr = arr.concat(x[key]);
return arr;
}, []).join('\n');
document.write('<pre>' + vals + '</pre>');