The best way is not to use evalat all:
obj[property_name_1] = property_value_1;
obj[property_name_2] = property_value_2;
If you still want to, you need to escape apostrophes and backslashes to put values in string literals:
eval("obj." + property_name_1 + "='" + property_value_1.replace(/\\/g,'\\\\').replace(/'/g,"\\'") + "'");
eval("obj." + property_name_2 + "='" + property_value_2.replace(/\\/g,'\\\\').replace(/'/g,"\\'") + "'");
(If you surround the letter string with quotes instead of apostrophes, you need to avoid quotes and backslashes.)