I would like to use create a object that contains regular expressions as the key value. I tried to use the following syntax:
var kv = { /key/g : \"value\
You can also use an expression as a key by wrapping it in [] when creating an object:
[]
var kv = { [/key/g] : "value" };