0
underscorejs
を流星上で実行している間、以下の問題に直面しています。テンプレートヘルパーの例外:TypeError:_.mapObjectが関数ではありません
"Exception in template helper: TypeError: _.mapObject is not a function"
助言してください。
var types = _.groupBy(areaFlatten, 'category');
console.log(types);
var result = **_.mapObject**(types, function(val, key) {
return _.reduce(val, function(memo, v) {
return memo + v.val;
}, 0)/val.length * 10;
https://jsfiddle.net/Lradh7jd/1/がmeteorjs –
私はUPDATをした代わりに_.mapObject –
の任意の代替にunderscorejsをアップグレードする方法はこちらをご覧代案を使って答えを編集 – mikeapr4