I'd like to grab a client IP address using javascript and send it over to my server using AJAX request. Any suggestions on how I can achieve this would be awesome. Some code example would be even better. Thanks in advance!
Front-end Javascript by itself doesn't have access to anything that will tell it a user's IP address. See here:
How to get client's IP address using JavaScript?
However, like it says in that answer, there are APIs you can use to get the IP address.
More importantly, though, any server receiving your AJAX request will have automatic access to the IP address. So if you can set up code on the server you should be good to go, or at least will have a different question.
If you don't have control over the server, and instead are doing something like POSTing data to a webforms API, then using an API is your best bet.