-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
  • 48,835
  • 10
  • 56
  • 78
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
  • 38
Munawir
  • 3,346
  • 9
  • 33
  • 51