From Wookiepedia, the novel apparently states that she intuited that a JMT might be possible based on resisting Kylo's mental probe and influencing his thoughts.
So yeah. If that's true then she just guessed that it was possible / how to do it. No prior knowledge.
And regardless of how she figured it out, the fact that it was jarring for a non-trivial portion of the audience (and that apparently many viewers misinterpreted how she figured it out and whether or not the JMT was common knowledge) probably means it could have been handled better.
So yeah. If that's true then she just guessed that it was possible / how to do it. No prior knowledge.
And regardless of how she figured it out, the fact that it was jarring for a non-trivial portion of the audience (and that apparently many viewers misinterpreted how she figured it out and whether or not the JMT was common knowledge) probably means it could have been handled better.