the approximate code is as follows:
let http = require("https")
let obj ;
//get
http.get("https://c.y.qq.com/",function(req,res){
let html="";
req.on("data",data =>{
html+=data;
//console.log(data);
});
req.on("end",() => {
//obj = eval ("(" + html + ")");
obj = JSON.parse(html);
//console.log(obj);
export {obj}
});
});
data can be exported by console.log, but data cannot be exported by export.