我以下面的格式从后端获取一些字符串,如何将其解析为JSON。
"{messages:"[{message_type:S,message_text:Instance 20000001002700000279 of object type RentalObjectREFX has been changed.}{message_type:S,message_text:Email sent sucessfully}]"}"
答案 0 :(得分:0)
喜欢那个
var json = JSON.parse('{"messages":"[{message_type:S,message_text:Instance 20000001002700000279 of object type RentalObjectREFX has been changed.}{message_type:S,message_text:Email sent sucessfully}]"}');
console.log(json);