1. 双引号转换为单引号

JSON.stringify(data).replace(/\"/g,"'");  

2. 单引号转换为双引号

data.replace(/'/g, '"');  

 

 

原文出处 : https://blog.csdn.net/weixin_33845881/article/details/85861807

相关文章:

  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案