I am trying to get the values of the below JSON string :
{
"PaymentStatus": [
{
"MerchantTxnRefNo": "277753772122780",
"PaymentId": "20239622798237",
"ProcessDate": "9/16/2022 8:39:00 PM",
"StatusDescription": "Transaction Success",
"TrackId": "20239622798237",
"BankRefNo": "20239622798237",
"PaymentType": "CMA",
"ErrorCode": "0",
"ProductType": "DBO",
"finalStatus": "success"
}
]
}
I have used the below code to get it but did not work :
request.AddParameter("application/json", body,
ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var obj = response.Content;
var TransactionObj = JObject.Parse(obj);
var jObject = Newtonsoft.Json.Linq.JObject.Parse(obj);
string StatusDescription = (string)jObject["PaymentStatus"]["StatusDescription"];
any suggestions?