Skip to Content

XSLT mapping to remove handle nodes

Hi Experts ,

I have one requirement. I need to remove Node element from JSON structure with help of XSLT mapping .

Example :

Input JSON input :

{

"ns0:MT_EMP_INFO" : {

"Id" : "",
"FIrstname" : "Lassy",
"LastName" : "Emanu",
"Location" : "UK",
"Entity" : "IT"

}}

Required JSON output :

{
"Id" : "",
"FIrstname" : "Lassy",
"LastName" : "Emanu",
"Location" : "UK",
"Entity" : "IT"

}

Can anyone help to fix this issue . this XSLT code will generic and can remove only

ns0:MT_EMP_INFO from JSON input .


Thanks in advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 22 at 06:15 AM

    same issue has been discussed in this thread.you may use groovy for this. try to adjust the groovy script code to fit for your requiremnt.

    https://answers.sap.com/questions/364055/how-to-remove-root-element-in-json-after-conversio.html

    Add comment
    10|10000 characters needed characters exceeded