I have an object like this coming back as a JSON response from the server:
{\"0\":\"1\",\"1\":\"2\",\"2\":\"3\",\"3\":\"4\"}
I want to conv
var obj = {"0":"1","1":"2","2":"3","3":"4"}; var vals = Object.values(obj); console.log(vals); //["1", "2", "3", "4"]
Another alternative to the question
var vals = Object.values(JSON.parse(obj)); //where json needs to be parsed