我的值如下,從php請求返回,所以它是一個字符串。我如何(轉換爲普通對象)將其放入下面的數據中?將字符串轉換爲普通對象
"fieldName: \"ABC\", skill: \"1002\""
jQuery.ajax({
type: 'GET',
url: setting_url,
data: {},
success: function (result) {},
error: function (xhr, ajaxOptions, thrownError) { },
complete: function() { }
});
哪些數據和字符串是什麼? – hjpotter92
響應是什麼樣的? JSON? –
數據在jQuery.ajax中,字符串爲「fieldName:\」ABC \「,skill:\」1002 \「」 –