Chartjs-ChartJS won't recognize JSON my database returns

0👍

The problem with your rply JSON string is that you need to wrap your keys with " because JSON.parse(..) expects a valid JSON format which requires double quotes.

You can see a brief explanation in w3schools – JSON syntax

JSON names require double quotes. JavaScript names don’t.

Here you can find a way to convert your string into a valid JSON format.

Leave a comment