How to get data from json file for net-snmp trap? <p>I have json file and i am exporting file into another file using require i see the data but when i print the value <code>obj.oid</code> from json object it returns undefined any idea why ?</p> <p>app.js</p> <pre><code>var snmp = require ("net-snmp"); var session = snmp.createSession ("127.0.0.1", "public"); var oids = require('./oids'); var obj = JSON.stringify(oids); console.log("OIDS",obj.oid) </code></pre> <p>oids.json</p> <pre><code> { "oid": "1.3.6.1.2.1.1.4.0", "type": "snmp.ObjectType.OctetString", "value": "user.name@domain.name" } </code></pre>