I know eval poses security issues and that there are already several questions here concerning this problem. However, in my case, I'm not sure there is a better alternative, or whether the risk is low enough considering the source of data.
I have a 2-dimensional array containing floating point numbers, so something like this:
arr = [[1.0,0.0],[2.0,1.0],...,[1.0,8.0,9.0]]
This array is initially a string I read from a file in my server, meaning that eval() or Function() should always run a string with a known value, since the file never really changes (though sometimes some strings' position in the file change, but the overall content remains the same).
Now I know I could just loop through the string and dynamically create this array of numbers but I wonder if it's worth the trouble, since, in this case, eval() seems to not be as harmful as it could be.