Newtonsoft passing Property to a value C#

  • Thread starter Thread starter diegodamage82
  • Start date Start date
D

diegodamage82

Guest
Hi.

How can I convert this Json:

{
"pnr": "test",
"lastName": "Perez",
"body": "",
"paymentRequests": [
{
"paymentMethod": {
"paymentType": "ExternalPayment"
}
}
]
}


to this Json

{
"pnr":"test",
"lastName":"Perez",
"body":{
"paymentRequests": [
{
"paymentMethod": {
"paymentType": "ExternalPayment"
}
}
]
}
}


I need to pass the node "paymentRequests" to the value of "body". I dont know how to convert the node to a value from other node.

Thanks in advance.

Continue reading...
 

Similar threads

J
Replies
0
Views
59
Jalil Sear [MCPD SharePoint]
J
C
Replies
0
Views
87
CSharp Enthusiast
C
K
Replies
0
Views
99
kapil kumar velpuri
K
Back
Top