How are string objects converted to objects?

the backend returns one of these things, how to convert it into object "{" State ": 0," Message ":" available "," Data ":}"

"
Apr.09,2021

the returned data needs to be repaired in one more step before JSON.parse. can be used. If the back-end staff can change it, the easiest thing is to change them to a standard json string.

attach the front-end reform

  

the outermost layer is changed to single quotation marks

Menu