let JV = require('./jpc_value_define');
let JpcFunc = {
    createNew: function (rptTpl) {
        let rst = [];
        if (rptTpl[JV.NODE_FORMULAS]) {
            for (let i = 0; i < rptTpl[JV.NODE_FORMULAS].length; i++) {
                let item = {};
                let propArr = Object.getOwnPropertyNames(rptTpl[JV.NODE_FORMULAS][i]);
                for (let key of propArr) {
                    item[key] = rptTpl[JV.NODE_FORMULAS][i][key];
                }
                rst.push(item);
            }
        }
        return rst;
    }
};

module.exports = JpcFunc;
