replaced string to string key in javascript code