【发布时间】:2019-09-12 19:43:27
【问题描述】:
我正在尝试使用 Zomato api 提取一些数据。但是,我被困在评论中。我似乎无法获得评论,因为我最终将 [Object Object] 作为文本的值。如果有人知道如何让评论显示为文本,请告诉我。
链接到实际代码:https://jsfiddle.net/fxrzm/nkLrh8fg/4/
const {thumb:img,name,location:{address},all_reviews:{reviews},user_rating:{aggregate_rating},cuisines,average_cost_for_two:cost} = restaurant.restaurant;
// 如您所见,我能够在 const 中提取除评论之外的其他数据。
【问题讨论】:
标签: javascript zomato-api