Jam stored in hot temperatures
If the jam was properly canned (likely, if it is store-bought) and was still sealed during that time, it shouldn't be spoiled.  The temperatures in canning are supposed to kill and seal out the dangerous bacteria, exposing the sterilized jam to more temperature shouldn't make the jam unsafe to eat.

What might have happened, depending on the jam involved, is a change in texture.  Pectin, which is found in fruit and acts as a thickener in many jams and jellies, can denature at high temperatures - which would make your jam thinner.  If you had started with something more like jelly, it can liquidfy into goop, or even syrup (depending on added pectin vs mechanical thickening) - still tasty, but harder to spread.  With a more solidly textured jam, which is also thickened with fruit pulp - it might be a little thinner, but perhaps not as badly so.

If it has turned thinner, you can still use it as a compote, a syrup, or a sweetner in any situation (like baking, for example) where the precise thickness and/or texture doesn't matter.  It isn't bad, still has fruit and sweetness to it, and can still be used.  I had a jar of jelly that melted this way that still made good syrup.