How to convert the data in this format into an array by data.data

Mar.23,2021

var dataArr = JSON.parse(data.data);

method for converting js class arrays to arrays


you can replace rPlan with empty first, and then convert it, otherwise the conversion will report an error, as follows:

var k = data.data
JSON.parse(k.replace(/r\n/g, ''))

of course, as a front-end developer, I just want to say who wrote the back-end, which is not friendly at all! The data provided by the back end should not contain such disorganized characters.
example is as follows:

var k = '[r\n {\r\n \"sub\":\"baidu\"} \r\n]';
JSON.parse(k.replace(/r\n/g, ''))
//[{sub: "baidu"}]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1960-236e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1960-236e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?