I have a JSON in the following format. I want to replace the Nutrition at the last index with Title using java code.
Current Format
{
"nutrients" : [{
"Nutrient" : "Alcohol, ethyl",
"Amount" : " 3.9",
"Unit" : " g"
}, {
"Nutrient" : "Fiber",
"Amount" : " 0.0",
"Unit" : " g"
}, {
"Nutrient" : "Alcoholic beverage, BUDWEISER, regular, beer"
}]
}
Required Format
{
"nutrients" : [{
"Nutrient" : "Alcohol, ethyl",
"Amount" : " 3.9",
"Unit" : " g"
}, {
"Nutrient" : "Fiber",
"Amount" : " 0.0",
"Unit" : " g"
}, {
"Title" : "Alcoholic beverage, BUDWEISER, regular, beer"
}]
}