will use jsonEncode instead of for loop to create the json response in master baker