You can't refer to a property of an object before you have initialized that object; use an external variable.
var key1 = "it";
var obj = {
key1 : key1,
key2 : key1 + " works!"
};
Also, this is not a "JSON object"; it is a Javascript object. JSON is a method of representing an object with a string (which happens to be valid Javascript code).