I am pretty new to java and javascript and I have a problem.
I have an array in the form of a string which looks like below in javascript.
[[0,'Apple','Banana'],['The Apple fruit, comes from Apple Tree', 'The Banana fruit, comes from Banana Tree']]
In this, I need to get the first array [0,'Apple','Banana'] and save it as a separate array and then I need to get the second array ['The Apple fruit, comes from Apple Tree', 'The Banana fruit, comes from Banana Tree'] and display it as a text in text area like this.
The Apple fruit, comes from Apple Tree
The Banana fruit, comes from Banana Tree
How can I achieve this in javascript?
Please need some help as I have googled about this problem intensively.
Thanks in advance.
evalit - it's seriously bad practice and it's not necessary.evalcan be very unsafe. Much better to useJSON.parse(string)to turn this into an array.