2
Answers

explain this jquery code please

Vikram

Vikram

9y
412
1
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)