title: Replace %20 by a space in a 'url.split' in javascript
body: <p>I know that this question has been asked more than once here. But the issue I'm facing is a bit different that the one's I checked in previous questions.</p>
  
  <p>I'm retrieving the Category in a variable from the URL in my JS by doing this-</p>
  
  <pre><code>$scope.category = url.split("=")[1]
  </code></pre>
  
  <p>This would be a sample URL-</p>
  
  <pre><code>sitename/pagename.aspx?Category=Cars
  </code></pre>
  
  <p>I'm facing an issue when there is a space in the category. Say if the URL is like this-</p>
  
  <pre><code>sitename/pagename.aspx?Category=Super%20Cars
  </code></pre>
  
  <p>Can you please lemme know how to replace the %20 by a space <strong>along with the url.split.</strong></p>
  
  <p>Sure this isnt a right one-</p>
  
  <pre><code>$scope.category = decodeURIComponent(url.split("=")[1]);
  </code></pre>
  
  <p>Lemme know if you need more info guys. :)</p>