How to convert a single string element representing an array of integers as strings to an array of integers in Javascript?
I have a string like this
var str = "["163600", "163601", "166881"]";
My output should be
[163600, 163601, 166881]
What I am trying is
var myArr = JSON.parse(str)
but in result I am getting an array of strings.
["163600", "163601", "166881"]
How can I get an array of integers?
I am trying to further parse like this
parseInt(myArr) but this is giving only for 0th index. Is there any way to get for the whole array?