Get Keyframes from animation

I am trying to set an object to the first keyframe of an animation. When I import the asset it doesn’t set itself to the first frame. so I thought that I could iterate through the keyframes and just set it to the first frame (the translation and rotation).

My pseudocode:

foreach( GameObject obj in objects)
{
	//get animation
	Animation anim = obj.GetComponent<Animation>();
	
	//some how get the keyframes
	Keyframes[] keys = anim.???

	Vector3 trans = keys[0].transform.localPosition;
	Quaternion rot = keys[0].transform.localRotation;
}

The keyframes concept from the traditional cartoons produced. Skilled animator Walt Disney studio in the early design cartoons critical screen, namely the so-called key frames, and then by the middle of the animators frame. Three-dimensional computer animation, the intermediate frame is generated by a computer, the interpolation instead of the design of the middle frame animator. All the parameters affecting the picture image can be the parameters of the key frame, such as the position, rotation angle, the texture parameters, etc… The keyframes technology is the most basic and the most widely used methods in computer animation. In addition, a method of animation settings spline-driven animation. In this method, the user interactively specify the movement of the object trajectory spline. Almost all of the animation software such as Alias, Softimage, Wavefront, TDI, 3DS, etc. to provide both basic animation set.