title: How to JSON decode array elements in JavaScript?
body: <p>I have a JavaScript array that, among others, contains a URL. If I try to simply put the URL in the page (the array is in a project involving the Yahoo! Maps API) it shows the URL as it should be.</p>
  
  <p>But if I try to do a redirect or simply do an 'alert' on the link array element I get: </p>
  
  <blockquote>
    <p>function(){return JSON.encode(this);}</p>
  </blockquote>
  
  <p>As far as I see it this is because the browser does an JSON.encode when it renders the page, thus the link is displayed OK. I have tried several methods to make it redirect (that's what I want to do with the link) correctly (including the usage of 'eval') but with no luck.</p>
  
  <p>After following some suggestions I've run <code>eval('(' + jsonObject + ')')</code> but it still returns the same output.</p>
  
  <p>So how's this done ? </p>