I'm using eval to interpret some variables input.
Possible inputs are
"somevar"
"someobj.someprop['somekey'].someprop"
"window.someprop"
etc.
However I dont want it to 'execute' any action. Like calling any function, changing any value of anything, declaring any variable.
So those should not be accepted (and any that change state of anything):
alert()
var somewar = 0
mywar = somewar
Is it possible via native js?
My target is just to interpret complex input variable "address" and return it.