{"id":10282441,"date":"2018-05-15T13:36:22","date_gmt":"2018-05-15T13:36:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/pass-javascript-array-as-data\/"},"modified":"2018-05-15T13:36:44","modified_gmt":"2018-05-15T13:36:44","slug":"pass-javascript-array-as-data","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/pass-javascript-array-as-data\/","title":{"rendered":"Pass JavaScript array as data"},"content":{"rendered":"<p>When my site loads, it creates a Javascript variable, &#8220;portfolio_info&#8221;, containing an array of objects used as a lookup table by numerous Javascript functions. <\/p>\n<p>I would like to display some of this same data in an HTML table created with the WP DataTable shortcode. How can a refer to this lookup table variable inside the shortcode?<\/p>\n<p>Thanks <\/p>\n<p>B<\/p>\n","protected":false},"template":"","class_list":["post-10282441","topic","type-topic","status-publish","hentry","topic-tag-datatable","topic-tag-javascript","topic-tag-shortcode"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10282441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10282441\/revisions"}],"predecessor-version":[{"id":10282444,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10282441\/revisions\/10282444"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10282441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}