public void SearchFood(int index) { String name = bindIndexToName(index); ReportObject.RootObject rootObject = EnterMealsModel.getReportInformation(name); Fat[index] = rootObject.foods[0].food.desc.ff; Carbon[index] = rootObject.foods[0].food.desc.cf; Protein[index] = rootObject.foods[0].food.desc.pf; }