- data = data.reduce((result, value) => {
- if (value !== '' && value !== null && value !== undefined && typeof value !== 'object') {
- result.push(value);
+ commaSeparatedValues = data.reduce((d, v) => {
+ let leaf = Serializer.leaf.call(this, d);
+ let value = leaf & leaf[this.name];
+ if (value && value.length) {
+ if (v.length) {
+ v += ', ';
+ }
+ v += value;