Reputation: 87
i want to console.table() a jquery array like this:
console.table($("input").filter(":hidden"), ["name", "value"]);
however, the table includes all those extra jquery properties that come along for the ride. is there a "correct" way to not output these extra properties to the table, or should i just populate a new array with (in this example) indices 0-8 and output that?
Upvotes: 1
Views: 830
Reputation: 29932
jQuery has a makeArray
function that looks promising.
It should return a JS array with all the elements from the original object:
jQuery.makeArray( $("input").filter(":hidden") )
See: http://api.jquery.com/jquery.makearray/
Upvotes: 2