How convert XML input file to json

Same thing I am doing .Did u convert it… If yes , then How??

In my own case i built the xml with my json…
here is the code:
xmlBuilder(obj:any){
return new Promise((resolve,reject)=>{
let xml2js = require(‘xml2js’);
let builder = new xml2js.Builder();
let xml = builder.buildObject(obj);
// console.log(xml)
resolve(xml),
(err:any)=>{
reject(err)
}
})
}