我应该得到贾斯汀的 DynamoDb id。通话似乎没有失败。如果console.log(returned)我得到一个[object Object]. 当我尝试到达returned.data.getIdFromUserName.idor returned.data.getIdFromUserName.email(表中的任何其他内容)时,我得到undefined. 我错过了什么?
返回数据:
{
"data": {
"getIdFromUserName": {
"items": [
{
"id": "3a5a2ks4-f137-41e2-a604-594e0c52a298",
"userName": "Justin",
"firstname": "null",
"weblink": "@JustinTimberlake",
"email": "iuiubiwewe@hotmail.com",
"mobileNum": "+0123456789",
"profilePicURI": "null",
"listOfVideosSeen": null,
"userDescription": "I wanna rock your body, please stay",
"isBlocked": false,
"GridPairs": null
}
],
"nextToken": null
}
}
}