I must be missing something. I can only include startTime, categoryName, level, and data in my json output.
It appears to be because the formatter code selects the fields from output instead of data:
// Only include fields specified in 'include' field
// if field is specified
if (config.include && config.include.length) {
const newOutput = {};
_.forEach(config.include, (key) => {
if (_.has(output, key)) {
newOutput[key] = output[key];
}
});
return newOutput;
}
data is set earlier as a clone of the formatter input:
function formatter(raw) {
const data = _.clone(raw);
...
and output specifically only selects a few fields:
I must be missing something. I can only include
startTime
,categoryName
,level
, anddata
in my json output.It appears to be because the formatter code selects the fields from
output
instead ofdata
:data
is set earlier as a clone of the formatter input:and output specifically only selects a few fields:
It would appear that this bit of code at line 105:
should be:
Am I missing something? I assume I'm doing something wrong...