我正在使用fs.createWriteStream()通过file.write(JSON.stringify(data)+“,”)将JSON数据异步添加到文件中。因此,每个json-object后都有一个逗号。如何避免/删除代码中最后一个json对象后的逗号?
var setMin = function( currentDateTime ){
this.setOptions({
minDate:'-1970/01/02'
});
this.setOptions({
minTime:'11:00'
});
};
$('.datetimepicker7').datetimepicker({
onShow:setMin,
onChangeDateTime:logic,
format:'d/m/Y',
formatDate:'d/m/Y',
timepicker:false,
theme:'dark'
});