require('linqjs')
let _=require('lodash')
let os=require('os')
let q=_.flattenDepth( _.toArray( os.networkInterfaces())).where(c=>!c.internal && c.family=='IPv4').select((c)=>{return  {mac:c.mac,ip:c.address}})
let q1=q.first().ip
console.log(JSON.stringify(q))