{"id":6941,"date":"2014-05-11T17:48:10","date_gmt":"2014-05-11T17:48:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/problem-about-jsviews-collection-of-common-programming-errors\/"},"modified":"2014-05-11T17:48:10","modified_gmt":"2014-05-11T17:48:10","slug":"problem-about-jsviews-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/problem-about-jsviews-collection-of-common-programming-errors\/","title":{"rendered":"problem about jsviews-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0577a89e479b21d7ef4d7284db5b39bd?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nmekkoo<br \/>\njsrender jsviews<br \/>\nSample JSON: https:\/\/gist.github.com\/mekkoo\/6604902I want using $.observable().insert method to object inner array &#8220;items&#8221;. but, I looked error &#8220;Uncaught TypeError: Object # has no method &#8216;insert'&#8221; when method callingpages = \/\/Sample JSON $.ajax calling $.observable(pages).insert(pages.length, {\/\/I want this data to insert to &#8220;items&#8221; array&#8221;item&#8221;: {&#8220;id&#8221;: 3,&#8221;item_name&#8221;: &#8220;Item Name 3&#8243;,&#8221;item_desc&#8221;: &#8220;Item Desc 3&#8243;,&#8221;item_img&#8221;: &#8220;http:\/\/example.com\/sample.png&#8221;},&#8221;values&#8221;: [{&#8220;id&#8221;: 0,&#8221;key_id&#8221;: 0,&#8221;value&#8221;: &#8220;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f67daf2b829df3663d2e94d9a60fff35?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nS.M.Amin<br \/>\njsviews<br \/>\nBelow is the example where #parent.data works and the first title can be changed. But when #parent.data is replaced with ~root, test2 tag is not rendered.&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;&lt;title&gt;&lt;\/title&gt;&lt;script src=&#8221;js\/jquery-1.9.1.min.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;&lt;script src=&#8221;js\/jsrender.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;&lt;script src=&#8221;js\/jquery.observable.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;&lt;script src=&#8221;js\/jquery.views.js&#8221;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/29a181c5a3bdbe5db3b83242851f966d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStuart M<br \/>\njsviews<br \/>\nI have custom tag which can have itself as an inner tag and I want to bind it its props as data. I can change the first test tag title property and see the change but cannot do that for the inner test tag. I think it is because of the wrong arguments of this.tagCtx.content.render(). Below is the example:&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src=&#8221;js\/jquery-1.9.1.min.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt; &lt;script src=&#8221;js\/jsrender.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/s<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n<p>I discovery a place to host code\u3001demo\u3001 blog and websites.<br \/>\nSite access is fast but not money<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.m5zn.com\/newuploads\/2014\/01\/30\/jpg\/e7da807964b1fff.jpg\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>mekkoo jsrender jsviews Sample JSON: https:\/\/gist.github.com\/mekkoo\/6604902I want using $.observable().insert method to object inner array &#8220;items&#8221;. but, I looked error &#8220;Uncaught TypeError: Object # has no method &#8216;insert&#8217;&#8221; when method callingpages = \/\/Sample JSON $.ajax calling $.observable(pages).insert(pages.length, {\/\/I want this data to insert to &#8220;items&#8221; array&#8221;item&#8221;: {&#8220;id&#8221;: 3,&#8221;item_name&#8221;: &#8220;Item Name 3&#8243;,&#8221;item_desc&#8221;: &#8220;Item Desc 3&#8243;,&#8221;item_img&#8221;: &#8220;http:\/\/example.com\/sample.png&#8221;},&#8221;values&#8221;: [{&#8220;id&#8221;: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6941","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6941"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6941\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}