I’m currently trying to convert an XML to a JSON Object in my Ionic app. I’ve tried the x2js plugin and also jsonix (but this one won’t work). The thing is, with x2js I can convert the xml to a json with the same attribute names of each field, but what i want is to rename them in the object.
let’s say the XML has an attribute “n” and i want it to be mapped as “name” in the object.
(I know this can be done with JAXB in a java project, for example)
I appreciate your support in advance.
@ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1
cordova (Cordova CLI) : 8.1.2 (email@example.com)
@ionic/app-scripts : 3.1.11 Cordova Platforms : android 6.4.0 Ionic Framework : ionic-angular 3.9.2
Android SDK Tools : 26.1.1 Node : v6.10.3 npm : 5.6.0 OS : Windows 10