I am wondering if there is a way to use the jQuery $.each()
function without getting the index of the current element.
I am using the $.each()
function verry often, but i always have to declare unused key variables like this:
$.each(data,function(unusedKey,subData){
//Do something with subData
});
Is there another jQuery function which just returns the values?
Note:
I want to use a jQuery Function! I know that i could use a simple for(var key in data)
, but I realy want to use jQuery!
By the way:
is the $.each()
function noteable slower? Or can I use it at the most unnecessary points?
Edit:
By data i mean JSON-Data