Best way I found was hot water and a microfibre. Soak one cloth wring it out and place over the sap for a few seconds then wipe off with another cloth. I did the whole of the roof bonnet and wings on my car doing that and never inflicted any swirls or scratches.
Another way would be Clay but that will remove some or all of the protection (depending on the Clay and what protection you have on it)
I wouldn't use WD40! That would be a right pain to remove from the car and you would end up stripping off any protection trying to remove it.