Skip to content

Instantly share code, notes, and snippets.

View Philip-Nunoo's full-sized avatar

Philip Nunoo Philip-Nunoo

View GitHub Profile
// Using axios and fast-xml-parser you can retrieve the data received as xml and converted to json object.
import axios from 'axios';
var fastXmlParser = require('fast-xml-parser');
let jsonObj = {};
axios.get('https://virgool.io/feed/@jEbrahimi')
.then(xml => xml.data)
.then(xmlText => {
if (fastXmlParser.validate(xmlText)) {