How to stop the jump animation once the character hits the ground. 2D Platformer

The jump animation will continue as long as the space bar is held. I want to stop the animation as soon as the player character hits the ground. Anyone know how I can do this.