I have a JSON structure like this :
{
"cars": {
"Nissan": [
{"model":"Sentra",
"doors":4},
{"model":"Maxima",
"doors":4}
],
"Ford": [
{"model":"Taurus",
"doors":4},
{"model":"Escort",
"doors":4}
]
}
}
I will enter key , output should print entire path till that key.
For example :
For Nissan ,first array:
Input :model , Output:cars->Nissan[0].model<br/>
Input:doors , Output:cars->Nissan[0].doors<br/>
For Nissan ,second array:
Input :model , Output:cars->Nissan[1].model<br/>
So, like that I want full path for every JSON field.
I tried Jackson framework to achieve this, but got no success.
Please help..