Open fyarepo opened 6 years ago
Hi, I try defaults options, but it does not add to output, What can I do? Regards gab
defaults: { "missingData": true },
@fyarepo same here, did you make it work?
Just figured out,
var map = {
...
item: {
.....
missingData: 'undefined'
},
defaults: {
missingData: true
},
...
}
Defaults fill in data where it is missing per item.
Here is the test: https://github.com/bozzltron/node-json-transform/blob/806d00e25535c659f0c01f10c5759ba227131633/test/nodeDataTransformSpec.js#L332
You need to use undefined
for all fields with no string default value.
item: {
.....
fieldWithBooleanDefaultValue: 'undefined'
},
defaults: {
fieldWithBooleanDefaultValue: false
},
cc. @fyarepo @churrinfunflais
Yes @ihorTymofieiev above works for me!. This issue can be closed
Hi, I try defaults options, but it does not add to output, What can I do? Regards gab