I am receiving data as such from URL.The URL is
data=%5B1%2C2%2C3%2C4%2C0%5D
which decodes to [1,2,3,4,0]
.
I have parsed this data using the below snippet
var queryObj = querystring.parse( theUrl.query );
But I think its not an array.How do I convert it into array.I have used toArray()
method but in vain.Thankx in advance.
Looks like your data is actually JSON. Parse it like this:
JSON.parse(querystring.parse(theUrl.query));