Do pineapples and onions really work against formaldehyde?

The issue of formaldehyde in homes, as mentioned earlier, has become a significant problem for many people after renovation or moving in. So, how can we effectively address and solve the formaldehyde problem?