Here "the heart" represents the feelings or emotions of a person. Alternate translation: "make a person feel joyful" or "make a person glad" (See: [[rc://en/ta/man/jit/figs-metonymy]])
Possible meanings are 1) "sweetness" represents kindness. Alternate translation: "we recognize our friend's kindness by his counsel" or 2) "sweetness" represents what we appreciate about a person. Alternate translation: "what we appreciate about a friend is his advice" (See: [[rc://en/ta/man/jit/figs-metaphor]])