SyntaxFix
Write A Post
Hire A Developer
Questions
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