Hi guys i need a little help here
here is my json
"offset": 0,
"total": 5,
"transactions": [
{
"amount": {
"currency": "EUR",
"formatted_value": "0,00 €",
"raw_value": "0"
},
"content_type": "title",
"date": "2023-08-12T00:58:50+02:00",
"device_type": "HAC",
"ext_ec_granted_contents": [],
"privilege_infos": [],
"title": "Rocket League®",
"transaction_id": 50695546073,
"transaction_type": "PURCHASE"
},
so what i want is showing only Title which is
"title": "Rocket League®",
and the value which is <pre> "formatted_value": "0,00 €",
so i tried this
public class getData
{
public int total { get; set; }
public List<_DataTransection> transactions { get; set; }
}
public class _DataTransection
{
public string title { get; set; }
public List<_Amount> amount { get; set; }
}
public class _Amount
{
public string raw_value { get; set; }
}
getData account = JsonConvert.DeserializeObject<getData>(result);
transection list is fine , it shows me the
"title": "Rocket League®",
but it won't show me the value i don't know why
What I have tried:
This fixed my problem ||
public class _DataTransection
{
public string title { get; set; }
public Amount amount { get; set; }
}
public class Amount
{
public string formatted_value { get; set; }
}