I have seen eval being misused this way a few times. Primarily, to avoid writing recursive logic, e.g. when resolving a query path.

If you have a query path (e.g. “foo.baz.baz[1]”) one can avoid writing recursive resolution (or loop) by using eval.

Written by

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store