Both. Since you are a NJ resident, you'll pay tax in NJ on all of your income. And NY will tax you for the income you earned in NY.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"