Problem with items.push - need string but getting object Object
<p>This is part of my code. Maybe it is a little implicity but problem is easy to localize, i think. I want variable <code>notions</code> to be something which when i add this i will add words of notions, not <code>object Object</code> like i have now.
With this code i see that it makes good <code>$link</code> as my links but i can't combine it to one <code>&lt;span&gt;</code> element or something which could i use as <code>notions</code> variable when i am pushin items by <code>items.push</code>:  </p>

<pre><code>  $.each(data, function(index, value) {
        var notions = [];                           
        var tags = data[0].extras.tags.replace(/[\[\]]/g, '').split(', ');
        var id = data[0].pk
        $.each(tags, function(i,v){
             var tag = v.match(/&lt;Tag:\s(.*)&gt;/);
             if(tag !== null){
                 var href = '/notion/';
                 var $link = $('&lt;a/&gt;').attr('href', href+tag[1]).text(tag[1]);                                                           
                 notions = notions + $link + '&amp;nbsp;&amp;nbsp;'; 
                 console.log($link); 
             }
         });        

         items.push('&lt;li style="border: 1px solid black; list-style-type: none" ' + 'id="' +         value.pk + '"' + 'name="' + value.fields.depth + '"&gt;' +
          '&amp;nbsp;&amp;nbsp;&lt;span class="zero"&gt;()&lt;/span&gt;&amp;nbsp;&amp;nbsp;' +                                
          '&lt;a href="' + value.extras.get_absolute_url_for_user + '"&gt;' + 
          '&lt;span style="font-family: Trebuchet MS,Liberation San; font-size: 125%"&gt;' +  value.fields.title + '&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;' +                                
          '&lt;a href="' + value.extras.get_my_url + '"&gt;' +
          '&lt;p style="vertical-align: middle; margin-bottom: 0; margin-top: 0"&gt;' +
          '&lt;img style="cursor: pointer; vertical-align: middle" src="' + MEDIA_URL + 
          'own/i2.png" title="Show this in 1"&gt;&lt;/a&gt;' +
          '&lt;img class="delete_item" name="' + value.pk + '"' + 
          '" style="cursor: pointer; vertical-align: middle" src="' + MEDIA_URL + 
          'own/minus.png" title="Delete this"&gt;' +                                
          '&lt;img class="get_item_form" name="' + value.pk + 
          '" style="cursor: pointer; vertical-align: middle" src="' + MEDIA_URL + 
          'own/plus.png" title="Add item"&gt;' + 
          notions +                               
         '&lt;/p&gt;&lt;/li&gt;'); 
         $( '&lt;ul/&gt;', { html: items.join('') } ).insertAfter( nevermind );

    });
</code></pre>
