{"id":1403,"date":"2022-08-30T15:16:14","date_gmt":"2022-08-30T15:16:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/15\/typeahead-js-cannot-read-property-of-isarray-of-undefined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:14","modified_gmt":"2022-08-30T15:16:14","slug":"typeahead-js-cannot-read-property-of-isarray-of-undefined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/typeahead-js-cannot-read-property-of-isarray-of-undefined-collection-of-common-programming-errors\/","title":{"rendered":"Typeahead.js &#8211; Cannot read property of &#39;isArray&#39; of undefined-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to implement the <code>typeahead.js<\/code> autocomplete\/search in an ASP MVC view but, in Chrome&#8217;s Console, when the page loads I am receiving the error:<\/p>\n<pre><code>Uncaught TypeError: Cannot read property 'isArray' of undefined ...  typeahead.js:26\n<\/code><\/pre>\n<p>This is the section of code in the typeahead.js file it is referring to<\/p>\n<pre><code>    isString: function(obj) {\n        return typeof obj === \"string\";\n    },\n    isNumber: function(obj) {\n        return typeof obj === \"number\";\n    },\n    isArray: $.isArray, *@  \n             \n<\/code><\/pre>\n<ol>\n<li>\n<p>Invert the <code>typehead<\/code> and <code>jquery<\/code> script definitions as more than obviously the first depends on the second:<\/p>\n<pre><code>\n\n\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-15 09:09:29. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am trying to implement the typeahead.js autocomplete\/search in an ASP MVC view but, in Chrome&#8217;s Console, when the page loads I am receiving the error: Uncaught TypeError: Cannot read property &#8216;isArray&#8217; of undefined &#8230; typeahead.js:26 This is the section of code in the typeahead.js file it is referring to isString: function(obj) { return typeof [&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-1403","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1403","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=1403"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1403\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}