There’s a thread pinned at the top here called “New York transportation advice”.
It contains much useful information.
Anecdotally: I did it for years (some NYC pilots have equipment that are responsible for EWR, LGA, & JFK); I don’t recommend it if you can avoid it.