How to convert url specific parameters to array? I have used many types or parameter. I have tried below code with var types = ['A', 'C']; and its working.
But it's not working with url. I need to get community parameter from URL. How to convert url parameters to array? like this var types = ['business_center','wireless_access'];
http://demo/apartments/?price-min=200&price-max=2356&bedroom=3&bathroom=2&ap_features%5B%5D=washer+%26+dryer+connections&ap_features%5B%5D=dishwasher&community%5B%5D=business_center&community%5B%5D=clubhouse&community%5B%5D=covered_parking&submit=SEARCH
//var types = ['A', 'C'];
var i = document.location.href.lastIndexOf('?');
document.location.href.substr(i+1).replace(/community=/g,'').split('&');
$('input[name="community[]"]').prop('checked', function() {
return $.inArray(this.value, types) !== -1;
});