Last active
          November 15, 2018 22:55 
        
      - 
      
 - 
        
Save kevintrankt/358bf43fdca0a8df29e180d6995434e6 to your computer and use it in GitHub Desktop.  
    Using Node.js with Import.io
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const request = require('request'); | |
| const csv = require('csvtojson'); | |
| const fetch = uri => { | |
| request(uri, (error, response, body) => { | |
| csv({ | |
| output: 'json' | |
| }).fromString(body) | |
| .then(data => { | |
| console.log(data); | |
| }); | |
| } | |
| }; | |
| fetch(<ENDPOINT>); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment