I am working with a object array in JavaScript and i want to output the code in a specific format i.e to remove the object array and created it like a array only and remove rest of the parameters.
purchase_roas: [
{
action_type: "omni_purchase",
value: "29.650019"
}
],
The output I need is in this format:
purchase_roas:29.650019
I tried using map function but the output is not the expected one. I used the code below:
for (var number in purchase_roas) {
if (purchase_roas.hasOwnProperty(number)) {
keys.push(number);
}
}
The output i am getting is ["0"]