Failing to set multiple attributes using .attr()
<p>how can I set the <code>.attr()</code> of my <code>iframe</code> by using the variable <code>attrs</code> made below ?</p>

<pre><code>iosocket.on('content', function (object) {
    var attrs = '';
    for (var key in object) {
        attrs = attrs.concat(",'" + key + "':'" + object[key] + "'");
    }
    attrs = '{' + attrs.substring(1) + '}';
    console.log(attrs);
    var i = $('&lt;iframe&gt;&lt;/iframe').attr(attrs);
    $('#in').append(i);
});
</code></pre>

<p>the console.log say it right but it doesn't work, my iframe never get the attrs and no error is dropped.</p>

<pre><code>{'width':'853','height':'480','src':'https://www.youtube-nocookie.com/embed/qNaknTgIbIg?rel=0','frameborder':'0','allowfullscreen':''}
</code></pre>

<p>I've also try with <code>.attr(eval(attrs))</code>, same issue.</p>
