0
我試圖從Recognize(時尚識別)API詢問API響應。數據如下所示返回。我試圖從下面的對象中提取服裝項目。在JavaScript中提取對JSON對象的API響應的特定部分
Object {data: " Array↵(↵ [id] => 1309↵)↵{"Status":true,"Data":{"VufindTags":["Dress"," Purse"]}}", status: 200, headers: function, config: Object, statusText: "OK"}config: Objectdata: " Array↵(↵ [id] => 1309↵)↵{"Status":true,"Data":{"VufindTags":["Dress"," Purse"]}}"headers: function (name) {status: 200statusText: "OK"__proto__: Object
我曾嘗試使用data.data其返回以下作爲字符串來訪問:
" Array
(
[id] => 1309
)
{"Status":true,"Data":{"VufindTags":["Dress"," Purse"]}}"
我然後試圖用JSON.parse從VufindTags提取數據。這沒有用。
有沒有辦法將其轉換成JSON對象?
感謝您的任何幫助!
非常感謝您的幫助!你的代碼解決了我的問題!最好的祝願 – Vinisha 2015-03-25 13:42:43