I need to be able to get the value of an object key. When I console.log(event);
a returned object, I am getting:
MessageEvent {
ports: Array[0],
data: "{
"event":"playProgress",
"data":{
"seconds":0.419,
"percent":0.002,
"duration":177.813
}
}"
}
I can't seem to get to value of the data.percent with console.log(event.data.percent)
. What am I doing wrong?