using System.Collections.Generic;
public List<Date> Dates{get;set;}
public string Note{get;set;}
public string TAMPayInPayOutDate{get;set;}
public string EntityID{get;set;}
public string EntityName{get;set;}
public List<Application> Applications{get;set;}
public class Application{
public string ApplicationID{get;set;}
public List<Portfolio> Portfolios{get;set;}
public decimal grandTotal{get;set;}
public string PortfolioId{get;set;}
public string PortfolioName{get;set;}
public string BuySell{get;set;}
public Category Category{get;set;}
public decimal Charges{get;set;}
public decimal Fees{get;set;}
public decimal Invoice{get;set;}
public decimal IGST{get;set;}
public decimal SGST{get;set;}
public decimal CGST{get;set;}
public decimal UTGST{get;set;}
public decimal Total{get;set;}
public static void Main()
string jsonData = "{\"Dates\":[{\"TAMPayInPayOutDate\":\"29-Sep-2020\",\"EntityID\":\"P0\",\"EntityName\":\"P0Name\",\"Applications\":[{\"ApplicationID\":\"IEX_200929_00030\",\"Portfolios\":[{\"PortfolioId\":\"P10\",\"PortfolioName\":\"P10Name\",\"BuySell\":\"B\",\"Category\":{\"Charges\":-100,\"Fees\":-100,\"Invoice\":-10000,\"IGST\":0,\"SGST\":-100,\"CGST\":0,\"UTGST\":-100,\"Total\":-10400}},{\"PortfolioId\":\"P11\",\"PortfolioName\":\"P11Name\",\"BuySell\":\"S\",\"Category\":{\"Charges\":-100,\"Fees\":-100,\"Invoice\":10000,\"IGST\":0,\"SGST\":-100,\"CGST\":0,\"UTGST\":-100,\"Total\":9600}}],\"GrandTotal\":-800}]},{\"TAMPayInPayOutDate\":\"30-Sep-2020\",\"EntityID\":\"P0\",\"EntityName\":\"P0Name\",\"Applications\":[{\"ApplicationID\":\"IEX_200930_00031\",\"Portfolios\":[{\"PortfolioId\":\"P10\",\"PortfolioName\":\"P10Name\",\"BuySell\":\"B\",\"Category\":{\"Charges\":-100,\"Fees\":-100,\"Invoice\":-10000,\"IGST\":0,\"SGST\":-100,\"CGST\":0,\"UTGST\":-100,\"Total\":-10400}},{\"PortfolioId\":\"P11\",\"PortfolioName\":\"P11Name\",\"BuySell\":\"S\",\"Category\":{\"Charges\":-100,\"Fees\":-100,\"Invoice\":10000,\"IGST\":0,\"SGST\":-100,\"CGST\":0,\"UTGST\":-100,\"Total\":9600}}],\"GrandTotal\":-800}]}],\"Note\":\"(-)signindicatesPayInand(+)signindicatesPayOut\"}";
Console.WriteLine("TAMPayInPayOutDate\tEntityID\tEntityName\tApplicationID\tPortfolioId\tPortfolioName\tBuySell\tCharges\tFees\tInvoice\tIGST\tSGST\tCGST\tUTGST\tTotal");
dynamic rootObject = JsonConvert.DeserializeObject<dynamic>(jsonData);
foreach(var date in rootObject.Dates){
foreach(var app in date.Applications){
foreach(var port in app.Portfolios){
Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\t{12}\t{13}\t{14}",date.TAMPayInPayOutDate,date.EntityID,date.EntityName, app.ApplicationID,port.PortfolioId,port.PortfolioName,port.BuySell,port.Category.Charges,port.Category.Fees,port.Category.Invoice,port.Category.IGST,port.Category.SGST,port.Category.CGST,port.Category.UTGST,port.Category.Total);
Console.WriteLine("\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{0}",app.grandTotal);