How to get the URL array parameter from javascript
i have an array for example http://localhost/search?&p[]=599
and i need to receive the 599 in javascript.I use the below function to get the parameter which is not array.How to get an array parameter. ?
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
}