A JSON object can only contain either other objects, arrays, numbers or strings. In your case the #test is just a text string, not an element. So yes, you need to append it to the document so that it's parsed and becomes part of the DOM tree. But you can also create the element without appending it to the document first:
Appending to document: $('#here').append(data.items); Creating it, modifying and then appending (only works if data.items is a string with properly valid XHTML): $(data.items).bind('something').css('something').appendTo ('#somewhere'); On Jan 25, 5:35 pm, Trend-King <i...@trend-king.de> wrote: > hello, i have another question about JSON i received the JSON Objekts > well, so my question is i receive an object like this data.items this > has html in it. > > how can i talk to an html object $('#test') that is in the JSON > Object. > > do i have to inject the html first by $('#putitthere').html > (data.items) and then talk to it? > > Thanks for your replies