You may be interested in the glycemic index [1] which represents how much a particular food causes your blood sugar to spike compared to pure sugar. Based on a cursory search, the GI for an apple is somewhere in the 30s which is way less than a candy bar which can be 70+.