假设我在firestore上有一个数据结构,如下所示。
Post : {
{
id: 123456,
title: "Post Title 1",
categoryID: 5
},
{
id: 123457,
title: "Post Title 2",
categoryID: 2
}
}
Category: {
{
id: 5,
name: "Technology"
},
{
id: 2,
name: "Economy"
}
}
因此,如何使用Firebase Cloud函数从Firestore获取以下输出。输出应如下所示。
output: {
{
id: 123456,
title: "Post Title 1",
category: "Technology"
},
{
id: 123457,
title: "Post Title 2",
category: "Economy"
}
}