{"size": 933, "ext": "js", "max_stars_repo_path": "src/js/input/souvenir_masuk.js", "max_stars_repo_name": "jjfreyy/pbs-public", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/input/souvenir_masuk.js", "max_issues_repo_name": "jjfreyy/pbs-public", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/input/souvenir_masuk.js", "max_forks_repo_name": "jjfreyy/pbs-public", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.3214285714, "max_line_length": 90, "alphanum_fraction": 0.498392283}
$(document).ready(function() {
    prepare_souvenir_list("ajax_repository", "id_souvenir, kode_souvenir, nama");

    $("#kode_souvenir").on("change", function() {
        var filter = $(this).val().toLowerCase();
        var is_found = false;
        $.each($souvenir_arr, function(i, val) {
            var kode_souvenir = val.kode_souvenir;
            var nama = val.nama;
            if (kode_souvenir.toLowerCase() === filter || nama.toLowerCase() === filter) {
                is_found = true;
                var id_souvenir = val.id_souvenir;

                $("#id_souvenir").val(id_souvenir);
                $("#kode_souvenir").val(kode_souvenir);
                $("#nama_souvenir").val(nama);

                return false;
            }
        });

        if (!is_found) {
            $("#id_souvenir").val("");
            $("#kode_souvenir").val("");
            $("#nama_souvenir").val("");
        }
    });
});