How can I get this object (tempObj) to be available outside of the function)?
The first console.log print it fine, but the other one gives an error that myJSON is not defined...
sensor.getAll(function (err, tempObj) {
var myJSON = JSON.stringify(tempObj);
console.log("Objekt "+ myJSON);
});
console.log(myJSON);