// the object below can be crafted in any fashion. In the end you want an Object Literal with your data stored on it.
var jsonData = { name: 'Ray', password: 'NIGERA RULES?!' };
// HTTP Protocol can only work with strings when transmitting data over the internet.
// JSON is a class and .stringify is a class-method. We use it to format
// the Javascript Data, which lives in memory, to JSON string.
var formattedJsonData = JSON.stringify( jsonData );
// INSPECT WHAT YOU EXPECT, compare the two.
console.log( jsonData );
console.log( JSON.parse( formattedJsonData ) );
// send it off
newXHR.send( formattedJsonData );
$('#file2').change();
тоже применили?