【发布时间】:2020-07-05 04:02:56
【问题描述】:
我对 dialogflow 很陌生,想计算列(年龄)中所有值的总和。我的数据结构如下,我基本上尝试检索这些值。
我的数据结构
请帮忙总结一下年龄列中的所有值。
function detectage(agent){
return admin.database().ref('data').child(agent.parameters.name).once('value').then((snapshot) => {
const value = snapshot.val();
const age = value.Age;
if(value !== null){
agent.add(`The age value from database is ${age}`);
}
});
}
【问题讨论】:
标签: javascript firebase-realtime-database google-cloud-platform dialogflow-es