面试题答案
一键面试function(doc) {
// 假设字段名为field
if (doc.field) {
var num;
if (typeof doc.field ==='string') {
num = parseInt(doc.field, 10);
} else {
num = doc.field;
}
emit('field', num);
}
}