Dear All,
Roundtrip(chennai-bangalore,bangalore-chennai) bus journey for a passenger PNR defined as below example
{
“data”: [
{
“id”: “10DF123”,
“PNR”: “BD1U5M”,
“traveler”: {
“name”: {
“name”: “ABC”,
“surName”: “BCA”,
“prefix”: “MR”
},
“gender”: “M”
}
}
],
“includes”: {
“routeInfo”: {
“10FD0123A1”: {
** “id”: “10FD0123A1”,**
“isPrime”: false,
“busRoute”: {
“departure”: {
“toStation”: “CHENNAI”,
“at”: “2024-04-29T23:35:00”
},
“arrival”: {
“fromStation”: “BANGALORE”
},
“class”: “Sleeper”
}
},
“10FD0123A2”: {
** “id”: “10FD0123A2”,**
“isPrime”: false,
“busRoute”: {
“departure”: {
“toStation”: “BANGALORE”,
“at”: “2024-04-30T23:35:00”
},
“arrival”: {
“fromStation”: “CHENNAI”
},
“class”: “Sleeper”
}
}
}
}
}
here am facing trouble to extract id value from “includes.routeInfo.10FD0123A1[0].id” =10FD0123A1
“includes.routeInfo.10FD0123A2[0].id”= 10FD0123A2
from the above structure route1=10FD0123A1, route2=10FD0123A2 and so on if it is multiple trip of round trip (chennai-bangalore-goa)
Note: route(1…n) name is dynamic string and same copied to id value
Could you please help me to extract routeId value …!
Thanks in Advance