I'm working with .net core. I hit an third-party api call with in a controller. I get response from the call. And response.Content is something like below.
"{\"GetAlertingTransactionsResult\":\"{\\\"Success\\\":true,\\\"Data\\\":[{\\\"RowNum\\\":\\\"1\\\",\\\"TransactionID\\\":\\\"611\\\",\\\"TransactionType\\\":\\\"Authorization\\\",\\\"Channel\\\":\\\"POS\\\",\\\"TxnStatusDescription\\\":\\\"Processed\\\",\\\"ErrorCode\\\":\\\"0000\\\",\\\"MID\\\":\\\"999222222222222\\\",\\\"TID\\\":\\\"99922236\\\",\\\"MerchantName\\\":\\\"NEW POS TEST MERCHANT\\\",\\\"MerchantAddress\\\":\\\"TEST ADDRESS LINE1 TEST ADDRESS LINE2\\\",\\\"TransactionAmount\\\":\\\"999.9900\\\",\\\"TipAmount\\\":\\\"0.0000\\\",\\\"DiscountAmount\\\":\\\"0.0000\\\",\\\"TotalAmount\\\":\\\"999.9900\\\",\\\"ApplicationVersion\\\":\\\"V6.0.0\\\",\\\"ApplicationID\\\":\\\"A0000007362010\\\",\\\"TxnDateTime\\\":\\\"7\\/9\\/2020 2:36:07 PM\\\",\\\"RequestDateTime\\\":\\\"7\\/9\\/2020 2:36:59 PM\\\",\\\"ResponseDateTime\\\":\\\"7\\/9\\/2020 2:36:59 PM\\\",\\\"InvoiceNumber\\\":\\\"4\\\",\\\"OldInvoiceNumber\\\":\\\"0\\\",\\\"BatchNumber\\\":\\\"15\\\",\\\"AuthNumber\\\":\\\"123\\\",\\\"AssociationName\\\":\\\"PayPakCard\\\",\\\"TC\\\":\\\"123\\\",\\\"ExpiryDate\\\":\\\"123\\\",\\\"ARQC\\\":\\\"2C254884E80D7FD2\\\",\\\"CardHolderName\\\":\\\"DEBIT\\/PAYPAK \\\",\\\"MaskedCardNumber\\\":\\\"2205 60** **** 0476\\\",\\\"Cardtype\\\":\\\"CHIP\\\",\\\"TSI\\\":\\\"6800\\\",\\\"TVR\\\":\\\"123\\\",\\\"AppLabel\\\":\\\"PayPak Debit\\\",\\\"TotalTxnCount\\\":\\\"0\\\",\\\"TerminalSerialNumber\\\":\\\"82683858\\\",\\\"CompositeKey\\\":\\\"123\\\",\\\"PINCaptureCode\\\":\\\"1\\\",\\\"IsReprint\\\":\\\"0\\\",\\\"CustomerMobileNo\\\":null,\\\"IPAddress\\\":\\\"43.245.8.61\\\",\\\"RRN\\\":\\\"123\\\"}],\\\"TotalNumberOfRecords\\\":1}\"}"
Now I want to get values of e.g TransactionID, TransactionType and Channel etc. How would I be able to get these values in C# (.net Core)?
For reference: Code of How I'm calling a third party API.
var client = new RestClient("third-party-api-link-here");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddParameter("application/json",
"{\r\n\"TransactionReportDTO\":\r\n{\r\n\"PageSize\":\"15\",\r\n\"PageIndex\":\"1\",\r\n\"TransactionType\":\"Authorization\",\r\n\"Channel\": \"POS\",\r\n\"MerchantName\" :\"NEW POS TEST MERCHANT\",\r\n\"TransactionAmount\" :999.9900,\r\n\"TotalAmount\":999.9900,\r\n\"MID\" :\"999222222222222\",\r\n\"TID\": \"99922236\",\r\n\"InvoiceNumber\":\"4\",\r\n\"RRN\": \"202007091436\",\r\n\"CardNumber\":\"2205600050000476\",\r\n\"TransactionStartDate\":\"2020-07-09\",\r\n\"TransactionEndDate\":\"2020-07-09\"\r\n}\r\n\r\n}"
, ParameterType.RequestBody);
IRestResponse response = client.Execute(request)