I am trying to convert an object to an array with pure javascript.
I want to convert this:
[{"itemCode":"Mob-mtr"},{"itemCode":"640-chr"}]
to this:
["Mob-mtr","640-chr","541-mtr"]
i have tried this code:
var arr = Object.keys(obj).map(function (key) {return obj[key]});
and a bunch of other variations with no success.
Any idea how i can convert this object to an array?