-1

http://localhost:8080/RestPOC/rest/emp/users?limit(30,780)

how can i get limit parameters in queryparam???

Mangeshsn
  • 1
  • 2

2 Answers2

0

You can use the location object to retrieve the parameters.

Take a look at one key search which may be your matter of interest.

Check this SO LINK

Community
  • 1
  • 1
brk
  • 46,805
  • 5
  • 49
  • 71
0

You can use regExp to find the values in paranthesis and split() to split by comma.

var url = "http://localhost:8080/RestPOC/rest/emp/users?limit(30,780)";

var regExp = /\(([^)]+)\)/;
var limits = regExp.exec(url)[1].split(',');

console.log(limits)
Jed Fox
  • 2,979
  • 5
  • 28
  • 37
Munawir
  • 3,308
  • 8
  • 32
  • 49