2
Reply

explain this jquery code please

Vikram

Vikram

Nov 9 2015 11:51 PM
398
please explain this code what is label:item.split and all 
 
function (data)
{
if (data.d.length > 0)
{
response($.map(data.d, function (item)
{
return {
label: item.split('/')[0],
val: item.split('/')[1]
}
}));
}
else {
response([{ label: 'No Records Found', val: -1 }]);
$('#txtSearch').val('');
}
}
Thanks in advance 

Answers (2)