how to evaluate/execute String expression as a code in Scala
Example
var data = "1+2"
prinln(eval(data))
>>> 3
So, in the above expression 1+2 is String, as there are double quotes around it. But on evaluation, it executed as arithmetical expression and answer is 3
Similarly, I have some dynamic scala code which is in the form of String, so I want to execute that.
I tried to search but didn't get anything. Any idea?