I'm trying to convert object from array of object in JavaScript but not working
[{"external_parts":"[ { "type": "D","xcor": 86.54545593261719,"ycor": 413.4545593261719} ] "}],
from that I want only this object
{ "type": "D","xcor": 86.54545593261719,"ycor": 413.4545593261719}
I have tried like that to convert but not working
var parsedValue = responseData.data.items[0].external_parts;
//convert
var result = {};
for (var i=0; i<parsedValue.length; i++) {
result[parsedValue[i].key] = parsedValue[i].value;
}
coordinatesArray.push(parsedValue);