How to convert dynamically created JSON object to XML in node.js ?
I have to dynamically create JSON object based on available which contains nested list of objects.
var Obj = {
root: {
Door_Keeper: {
ID: {
'#list': [{
Key: {
Name: "Door_Keeper_ID",
Value: DoorKeeper.dkId
}
}, {
Key: {
Key_Name: "ID",
Key_Value: DoorKeeper.id.Id
}
}]
},
Name: doorKeeper.dkName,
Description: doorKeeper.dkId,
Settings: dkSettings,
'#list':
//Here I have list of objects which will be added dynamically
}
}
};
I want to generate XML string from the above JSON object in node.js