title: How can i read a Json file with a Azure function-Node.js
body: <p>I have created an Azure time trigger function and i want to read a Json file with him. I did install read-json and jsonfile packages and tried with both, but it did not work. Here is an example function</p>
  
  <pre><code>module.exports = function (context, myTimer) {
     var timeStamp = new Date().toISOString();
     var readJSON = require("read-json");
  
      readJSON('./publishDate.json', function(error, manifest){
          context.log(manifest.published);
      });
      context.log('Node.js timer trigger function ran!', timeStamp);
      context.done();    
  };
  </code></pre>
  
  <p>Here is de error:</p>
  
  <pre><code>TypeError: Cannot read property 'published' of undefined
      at D:\home\site\wwwroot\TimerTriggerJS1\index.js:8:29
      at ReadFileContext.callback (D:\home\node_modules\read-json\index.js:14:22)
      at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13).
  </code></pre>
  
  <p>Json file is in same folder with the index.js. I assume that this error occurs because of the path './publishDate.json', if so how should i type a valid path?</p>