window.eval("['bcs/abc/xyz.pdf', 'bcs/abc/xyz.pdf']");
gives output array object with urls
how to do this without using eval, any elegant solution? Json.parse is not working in this scenario.
JSON.parse is not working because it's not valid JSON. The most elegant solution is to make sure whatever is producing that value is producing valid JSON. Post-fixing the wrong data is pretty much always the wrong approach.
JSON.parse('["bcs/abc/xyz.pdf", "bcs/abc/xyz.pdf"]')JSON.parseis not working because it's not valid JSON. The most elegant solution is to make sure whatever is producing that value is producing valid JSON. Post-fixing the wrong data is pretty much always the wrong approach.'quote.