MainWindowTitle for process


I use ps-node to get a list of processes, and I would like to display them, but in that situation, if you use the command as the text to display (or part of it) you wouldn’t know which is which.
Is there any way to get the process’s main window title from its PID?