Monday, April 9, 2018

How to convert int List


 var IDs = ConvertToIntList($("#ddlEids").chosen().val());  //1,2,3,4,5
function ConvertToIntList(lstvalues) {

    var resArray = [];
    if (lstvalues != null && lstvalues != "" && lstvalues.length != 0 && typeof lstvalues != "undefined" && lstvalues != "undefined") {
        resArray = lstvalues.map(function (val, i) {
            return parseInt(val);
        });
    }
    return resArray;
};

No comments:

Post a Comment

javascript Filter/index off

 var family = [{"name":"Jack",  "age": 26},               {"name":"Jill",  "age"...