skhatri
3 years agoNew Contributor
Json conversion to new object
Hi All,
Good morning,
I have a requirement for converting json into xml with attributes.
So, I understood in order to make the XML with attributes from json, I have to have below structure of json to be feed to xml formatter for final conversion.
Required JSON format,
[
“h1”: {
“h2”:{
“f”:[
{“@name”:“Field1”,“$”:“10/3930”},
{“@name”:“Field2”,“$”:“true”}
]
}
}
]
My Original json is like this
[
{
“Field1”:“10/3930”
“Field2”:“true”
}
]
How to convert original json to required json structure for XML formatter.
Any help will be much appreicated.
Regards,
San