The habitats where marsh St John's wort~(Hypericum elodes) grows:

Lowland fen
Upland spring flush
Valley mire