快速将数组对象的key转换成驼峰格式
const camelCase = require('camelcase'); // npm 驼峰格式小工具 arr= arr.map((obj) => { const newObj = {}; Object.keys(obj).forEach((key) => { newObj[camelCase(key)] = obj[key]; }); return newObj; });
const camelCase = require('camelcase'); // npm 驼峰格式小工具 arr= arr.map((obj) => { const newObj = {}; Object.keys(obj).forEach((key) => { newObj[camelCase(key)] = obj[key]; }); return newObj; });