change replaceSymbolsInJavaScript to put undefined when no key is found.