SOURCE

let AS_doc=' [{"_id":"61e278bab9ddf91299f4ba2c","uuid":"cb328271-b26f-4f04-8fa2-9920661b234c","__v":0,"createTime":"2022-01-15T07:33:14.197Z","description":null,"name":"evpn组网套餐","products":[{"cloudProduct":[],"port":[],"_id":"61e5431533854d6f60190e9c","product":"61e2784cb9ddf91299f4b773","productCode":"MANAGE_OL_SDNC","businessSegmentGateway":[],"routeConfig":[]},{"cloudProduct":[],"port":["eth1","eth2","eth3","eth4","eth5","eth6","eth7","eth8"],"_id":"61e5431533854d6f60190e9b","product":"61e2785db9ddf91299f4b807","productCode":"EVPN_NET","layer":"router","masterDns":"","slaveDns":"","vlanMode":"","vlan":1,"autoProgram":0,"nat":false,"vrfIsShare":false,"vrfName":"","tenantDefaultLanMask":21,"deviceDefaultLanMask":27,"businessSegmentGateway":[],"routeConfig":[],"dhcpSwitch":1,"spokeToSpoke":true,"isConsistentVlan":false,"l3Vni":"1000-9998","rdCode":"0010","as":"56000"}]}]';
var jsonList=eval("("+AS_doc+")");  
console.log(AS_doc);
console.log(jsonList[0].products[1].as);
console 命令行工具 X clear

                    
>
console