let newText = [{"name":"en3","value":234},{"name":"en4","value":135},{"name":"en1","value":335},{"name":"en2","value":310},{"name":"en5","value":1548}]
Is there a way to convert this data into JSON format without using the """ characters?
For example, like this:[{"name":"en3","value":234},
and so on?
I attempted to use
JSON.parse('${resultData}'.replace(/"/g, '\\"'))
, but it resulted in an error saying Uncaught SyntaxError: Unexpected token \