How to detect landing and takeoff using the value of GND field in ADS-B messages? How to understand that an aircraft is landing or taking off by analyzing MSG messages? According to this article we just need read GND field (22). I also heard that during landing the aircraft is sending MSG.2 with field 22 at 1.

I don't understand whether the aircraft is landing or taking off when the field is 1. It seems it just means the aircraft is on the ground, but there is no information about it's exact state.

How to actually detect that an aircraft is landing or taking off?
There is no field in any of the eight message types that indicates that an aircraft is in the process of either landing or taking off. Field 22, where it is transmitted, is a simple binary status: the aircraft is on the ground, or it is not. If you want to know what an aircraft is doing look at values for field 22 in successive messages. When the state changes you'll know that an aircraft has transitioned from ground to not-on-ground and has taken off (or vice versa)

Depending on how you define it, the actual period for which a 'taking off' status would be valid could be very short. I.e, just the duration of the take-off roll. Before that the aircraft is taxying and on-ground; after that it is flying. The same limitation is true for landing, but in reverse.