I have the below JSON which I have parsed into JToken 'token'.
{
"base": {
"employees": {
"employeewage": {
"employeeids": [
{
"employeeid": "AA",
"details": [
{
"position": "Tester",
"salary": 8500,
"currency": "INR"
}
]
}
]
}
}
}
}
I need to get the value of 'salary' field alone. The code I tried,
var salary = token.SelectToken("$.base.employees.employeewage.employeeids.details.salary").ToString();
I am getting exception with this. Any help would be helpful.