title: Javascript: append single quotes to individual object results
body: <p>I have an object with multiple properties, I want to wrap the results in single quotes and commas if there are multiple values please see the following fiddle.</p>
  
  <p><a href="http://jsfiddle.net/efv7sh9d/1/" rel="nofollow">http://jsfiddle.net/efv7sh9d/1/</a></p>
  
  <pre><code>      var obj = {
        WKF001: ['test1'], 
        WKF002: ['test2','test3'],
        WKF003: ['test4','test5','test6','test7'], 
        WKF004: ['test8','test8','test9','test10','test11'],
        WKF005: ['test12','test13','test14','test15','test16']
      }
  
    function returnCodes(wkf, obj) {
      for (var d in obj) {
          if (d.indexOf(wkf) &gt; -1) {
              return obj[d];
          }
        }
         return 'Unknown';
        }
  
      var wkftest1 = "WKF001";
      var wkftest2 = "WKF002";
      var wkftest3 = "WKF003";
  
  document.write(returnCodes(wkftest3, obj).join("','"));
  </code></pre>
  
  <p>This will return test4','test5','test6','test7 and I need it to be 'test4','test5','test6','test7'</p>