Pectin is a structural heteropolysaccharide contained in the primary cell walls of terrestrial plants…