{"id":1580,"date":"2015-12-15T11:21:56","date_gmt":"2015-12-15T10:21:56","guid":{"rendered":"http:\/\/blog.kodono.info\/wordpress\/?p=1580"},"modified":"2015-12-15T11:21:56","modified_gmt":"2015-12-15T10:21:56","slug":"quickly-find-if-an-object-is-an-array-javascript","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2015\/12\/15\/quickly-find-if-an-object-is-an-array-javascript\/","title":{"rendered":"Quickly find if an object is an array [JavaScript]"},"content":{"rendered":"<p>You could use <code>Array.isArray(obj)<\/code> but it&#8217;s not available for IE8 and it doesn&#8217;t seem very good on the performance side. The <a href=\"http:\/\/jsperf.com\/js-isarray-comparison\">best one on the different browsers<\/a> is to test: <code>obj instanceof Array<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You could use Array.isArray(obj) but it&#8217;s not available for IE8 and it doesn&#8217;t seem very good on the performance side. The best one on the different browsers is to test: obj instanceof Array<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[11,81,33],"tags":[24,151,164,158],"class_list":["post-1580","post","type-post","status-publish","format-standard","hentry","category-niveau-debutant","category-performance","category-programmation","tag-javascript","tag-niveau-debutant","tag-performance","tag-programmation"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1580"}],"version-history":[{"count":1,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1580\/revisions"}],"predecessor-version":[{"id":1581,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1580\/revisions\/1581"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}