Here What I have got as a response
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
This is the Postman response
[
[
{
"@id": 1,
"name": "approval",
"figure": "15",
"type": "tile",
"function": "auxxa.Approval",
"url": "https://api.auxxa.com/BIMobile/GetApprovals"
},
{
"@id": 1,
"name": "returnCheque",
"figure": "158,000.00",
"type": "tile",
"function": "auxxa.ReturnCheque",
"url": "https://api.auxxa.com/BIMobile/GetApprovals"
},
{
"@id": 1,
"name": "notification",
"figure": "12",
"type": "tile",
"function": "auxxa.Notification",
"url": "https://api.auxxa.com/BIMobile/GetApprovals"
}
]
]
Here I post my fetch method
fetch(url, {
method: "GET"
})
.then(response => response.json())
.then(responseData => {
//set your data here
console.log("Landing Data " + responseData[0]);
})
.catch(error => {
console.error(error);
});
Could not find the actual issue.Please help me to sort out this issue.Thanks in advanced.
最佳答案
将其设为 ,
而不是 +
。
console.log("Landing Data " , responseData[0]);
它只会打印数据,但您将全面了解您的响应
关于javascript - React Native 中的响应错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51244305/