title: Iterate through ViewData array and use javascript code
body: <p>I have an array that is passed through the ViewData to my view. This array is composed of several elements of one of my Models.</p>
  
  <p>I want to iterate through these elements and use javascript code with elements of the object.</p>
  
  <p>Example in pseudo-code: </p>
  
  <pre><code>for x in ViewData["asdasd"] {
  
    foo(x.Property)
  
  }
  </code></pre>
  
  <p>foo is a javascript function.</p>
  
  <p>How can i do this?</p>