You could use a JSON to match the code with the symbol, here is a JSON to do so: https://gist.github.com/Fluidbyte/2973986
Fiddle
var data = {
// the json I gave you above
}
var code = $('input').val();
// the input which contains the code
$.each(data, function(i, v){
if(i === code){
$('#result').html(v.symbol);
// #result is an empty tag which receive the symbol
return;
}
});