title: how to publish realtime streaming json data received from a URL over mqtt using node.js
body: <p>I have the following code which accepts data from the url and print the json formatted data.I want to publish the same data to mqtt using node.js.Is there any sample code for the same?</p>
  
  <pre><code>`var request = require('request')
  var JSONStream = require('JSONStream')
  `var es = require('event-stream')` 
   `request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
  `.pipe(JSONStream.parse('rows.*'))
   .pipe(es.mapSync(function (data) {
   console.log(data);
   console.error(data)
   return data
   }))
  </code></pre>