const fs = require('fs');
console.log(fs)
mapData.RECORDS.sort(function(a, b) {
return a.data_type - b.data_type
})
fs.writeFileSync('test1.json',JSON.stringify(mapData.RECORDS))
const fs = require('fs');
console.log(fs)
mapData.RECORDS.sort(function(a, b) {
return a.data_type - b.data_type
})
fs.writeFileSync('test1.json',JSON.stringify(mapData.RECORDS))
本文标题:将数据写入本地JSON
本文链接:https://www.haomeiwen.com/subject/iuxjnltx.html
网友评论