var fs = require('fs'); var logHelper = require("../helper/LjLogHelper.js"); var lessonJsonObj = JSON.parse(fs.readFileSync("./audio.json")); /*课件-Begin*/ //课程集合 var courseList = lessonJsonObj.data.list; //课程数 var courseListSize = courseList.length; //遍历课件 for (var i = 0; i < courseListSize; i++) { logHelper.info(courseList[i].title); //资源集合 var resourceList = courseList[i].list; //资源数 var resourceSize = resourceList.length; for (var j = 0; j < resourceSize; j++) { logHelper.info(resourceList[j].url); } } /*课件-End*/