Is it possible to build a CPU from content-addressable memory?
You certainly can build one of these, and Wikipedia claims that the Goodyear MPP was such a thing. It isn't quite, but it has most of the real elements that you'd actually want.

Putting the code in CAM as well offers you a lot of inconvenience for no real benefit, so you'd store it in regular DRAM. For practical purposes, you would have a CAM peripheral, like a graphics accelerator. And you wouldn't use it to run regular Javascript; the speed advantage for selecting one out of a few dozen object members would be tiny. It makes sense if you want to ask the question "which of these million items have value X"?