I'm having trouble decoding an array of strings from what I thought was JSON.
var result = [
"{gene: 'PEX2', go_bp: '0.766500871709', CombinedPvalue: '9.999999995E-4'}",
"{gene: 'PEX5', go_bp: '0.766472586087', CombinedPvalue: '9.999999995E-4'}",
"{gene: 'PEX7', go_bp: '0.766386859737', CombinedPvalue: '9.999999995E-4'}"
];
You can see that there are 3 gene-related strings of JavaScript object literals, each encoded as a string. How can I decode these?
I tried JSON.parse but it gives me an error.
for (var i = 0; i < result.length; i++)
console.log(JSON.parse(result[i]));
Uncaught SyntaxError: Unexpected token g.
Is there a simple way?
{"key": "value"}not{key : "value"}.