for example,
I want to read a json file, convert the content to string, and then use JSON.paras to convert it into a JSON object.
I"m confused right now. Please give me some guidance.
//
let result = require("./func").read2JSON("db/list.json");
console.log(result);
The result shows undefined.
, so how exactly do you return the result to the outermost layer? What exactly is this principle?