node.js - 将 api 响应转换为 nodejs 中的视图
问题描述
如何将响应转换为可用的 {app_sale_price.value} 视图?
function(error, response) {
if (!error) {
res.send(response['resp_result']['result']['products']['product'][1]);
const jsonResponse = await response.json();
return JSON.stringify(jsonResponse);
const arrayOfLists = jsonResponse.records.map(
record => {app_sale_price.value}
)
return arrayOfLists;
} else {
res.send(error);
}
})