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?
`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
}))