Extracting part of current page's URL in javascript
<p>In ASP.NET MVC 3 site, I open the following uri</p>

<pre><code>http://myserver/incidents/supercompany/register
</code></pre>

<p>That page needs to make use of ajax JSON retrieval mechanism with the help of jQuery:</p>

<pre><code>$.getJSON('/Incidents/[[COMPANY NAME GOES HERE]]/SearchPeople/' + request.term, function (data) 
</code></pre>

<p>I am new to javascript. How can I obtain <code>supercompany</code> part of my current url to build the</p>

<p><code>/Incidents/supercompany/SearchPeople/</code> string?</p>
