title: How to remove redundant quotation marks in dynamically created json object with javascript?
body: <p>Following problem: I want to create an Audio player with a playlist like on this site: <a href="http://www.davidorlowsky.com/player/demos/lark.htm" rel="nofollow">http://www.davidorlowsky.com/player/demos/lark.htm</a></p>
  
  <p>If you click the right mouse button and view the source code you'll see that the playlist has the following form:</p>
  
  <pre><code>[
          {
              title:"Gypsy Hora",
              artist:"Trad.",
              mp3:"http:///www.klezmorim-online.de/lark/gypsyhora.mp3"
          },
          {
              title:"Sammy's Freilach",
              artist:"Trad.",
              mp3:"http:///www.klezmorim-online.de/lark/sammysfreilach.mp3"
          },
          ...
  ]
  </code></pre>
  
  <p>What I'm trying to do is: creating this kind of playlist dynamically via parsing through a directory. This is how I try to do it:</p>
  
  <pre><code>$(document).ready(function () {                
      var sound_files = Array();
      $.ajax({
          url: "my_directory/",
          success: function (data) {
              $(data).find("td &gt; a").each(function () {
                  var file = $(this).attr("href");
                  if (file.substr((file.lastIndexOf('.') + 1)) == "mp3") {
                      var mp3 = file;
                      var title= mp3.substr(0, mp3.lastIndexOf('.'));
                      //sound_files.push("{title: \""+title+"\", mp3: \"my_directory/" + mp3 + "\"}");
                      sound_files.push("{mp3: \"my_directory/" + mp3 + "\"}");
                  }
              });
          }
      }).done(function () {
          console.log(sound_files);
          new jPlayerPlaylist({
              jPlayer: "#jquery_jplayer_1",
              cssSelectorAncestor: "#jp_container_1"
          }, sound_files, {
              swfPath: "jplayer",
              supplied: "oga,mp3"
          });
      });
  });
  </code></pre>
  
  <p>It doesn't work that way and I think it's because there are redundant quotation marks in the json object. The resulting object looks like this:</p>
  
  <pre><code>["{mp3: "my_directory/my_file.mp3"}", ...]
  </code></pre>
  
  <p>but should look like:</p>
  
  <pre><code>[{mp3: "my_directory/my_file.mp3"}, ...]
  </code></pre>
  
  <p>How could I do this?</p>