getbypath:通过路径获取JSON数据 怎么取集合的第一项里面的map的第一个字段
参考这个用法:
安装 npm install getbypath 用法 var getByPath = require('getbypath'); var obj = { foo: { bar: { baz: 'thedata', biz: ['one', 'two'] }}}; var bar = getByPath(obj, 'foo.bar.baz'); console.log(bar);