我正在使用 ionic 3 和 Baqend 为 BaaS 构建应用程序。
如果我有以下数据:
product :{
id: xxx,
item: {
name: "Name",
description: "product details.."
}
}
如何检索“item.name”中的值?
我尝试了以下但给了我“未定义”。如果我这样做,它会起作用,product.id
但对于嵌套数据则不然。
import { baqend } from "baqend";
...
db: baqend;
...
this.db.Products.find().resultList(function(results) {
results.forEach(function(product) {
console.log(product.item.name);
});
});
我正在关注 Baqend 指南: https ://www.baqend.com/guide/topics/queries/