Using non-ASCII character as JavaScript object key [duplicate]

You can use a subscript to reference the object:

> var obj = {
  'ア' : 'testing',
  'ダ' : '2015-5-15',
  'ル' : 123,
  'ト' : 'Good'
};
> undefined
> obj['ア']
> "testing"

You should also not that object keys and values in JavaScript objects are separated by :(colons) not => (fat commas)

Leave a Comment