According to Babycenter there is an ingredient in pineapple called Bromelain that helps to thin your cervix, but there is such a small amount you would need at least 7 fresh pineapples to do anything (juice and canned would not work because the processes involved destroy the bromelian) but they warn you at the same time that consuming that much pineapple is not very safe because its very acidic and will likely just end up giving you heartburn and and diarhea.
From personal experience, one pineapple is pushing it, I couldn't even make it to two because the heartburn was so bad. I tried it on friday (39 weeks)
Approx 35 fresh pineapple!
You'd apparently have to eat like 7 whole ones for it to work.
I tried it with my son I ate a whole cup of pineapple chunks and it didn't help me at all but it's different for everybody I've known some people that it made them go into labor
I think it's like all the other tricks they have. Not guaranteed to work but can help.