You need to pass the json object to the original property.
Then your ui.item is an object, with Id, value, everything you want.
$(function() {
var students = [{id: 1322,label: "student 1"},{id: 2,label: "Student 2"}];
$( "#search-student" ).autocomplete({
source: students,
minLength: 2,
select: function( event, ui ) {
window.location.href="/?studentId=" + ui.item.id;
}
});
});
jQuery getJSON: http://api.jquery.com/jQuery.getJSON/, json ajax.