I want to iterate through all nodes of a JsonNode object, And want fetch price details from below JsonNode object , Can some one help me how can we fetch below price details
response
{
"content": {
"cart": {
"logs": {
"logs_cart_100": {
"method": "over",
"items": {
"111": {
"firstName": "Ram",
"lastName": "K",
"price": {
"amount": 100.0,
"baseAmount": 100.0,
}
},
"222": {
"firstName": "Velvan",
"lastName": "S",
"price": {
"amount": 200.0,
"baseAmount": 200.0,
}
},
"333": {
"firstName": "Dinesh",
"lastName": "M",
"price": {
"amount": 300.0,
"baseAmount": 300.0,
}
}
}
}
},
"promotions": [
{
"promotionName": "Dummy-1"
},
{
"promotionName": "Dummy-2"
},
{
"promotionName": "Dummy-3"
}
]
}
}
}
ObjectMapper mapper = new ObjectMapper();
JsonNode actualObj = mapper.readValue(response, JsonNode.class);