Created
October 19, 2015 19:19
-
-
Save puiutucutu/bb0b8f0a72fbef43916f to your computer and use it in GitHub Desktop.
push array nested js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| responseAsArray = [] | |
| // expand to have the correct amount or rows | |
| for(var i = 0; i < 12; i++ ) { | |
| responseAsArray.push([]); | |
| } | |
| // expand all rows to have the correct amount of cols | |
| for (var i = 0; i < response.length; i++) { | |
| responseAsArray[i].push(response[0].Name); | |
| responseAsArray[i].push(response[0].EContentsID); | |
| responseAsArray[i].push(response[0].InsertDate); | |
| } |
Author
puiutucutu
commented
Oct 20, 2015
Author
// destroy data table if it has already been initialized
if ($.fn.DataTable.fnIsDataTable(jQuery(table))) {
table.DataTable().destroy()
}
Author
Author
<!-- Data Table ::: Start -->
<table id="resultTable" class="table table-striped table-bordered table-hover table-condensed no-bottom-margin"></table>
<!-- Data Table ::: End -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment