Ajax parse json string is returning undefined,

后端 未结 2 1020
独厮守ぢ
独厮守ぢ 2021-01-25 20:13

I am sending a post data to get a json string back:

My JSON string:

{\"error\":false,\"success\":\"Added Website\",\"website_id\":\"12\"         


        
2条回答
  •  -上瘾入骨i
    2021-01-25 20:48

    Try parsing your json string to a json object to get your values:

    data = JSON.parse(data);
    

提交回复
热议问题