2
說我的情況是這樣的:我如何計算在Keen IO中有多少事件存在某個列表項目?
purchase = {
items: ["pickle", "turtle", "lexicon"]
}
如何計算有多少事件有「泡菜」?
說我的情況是這樣的:我如何計算在Keen IO中有多少事件存在某個列表項目?
purchase = {
items: ["pickle", "turtle", "lexicon"]
}
如何計算有多少事件有「泡菜」?
使用equal
運算符。
var count = new Keen.Query("count", {
event_collection: "purchases",
timeframe: "this_14_days",
filters: [
{
property_name: "items",
operator: "eq",
property_value: "pickle"
}
]
});
從API reference for filters & their operators:
「等於」 - 請注意,如果你的屬性值是一個數組,「EQ」可以用來過濾出數組內的值。例如,eq:5將匹配[5,6,7]的值。