I have a string representation of a js array
[{leervorm:"K", id:"48941AA9EE5AB0A1C1258526005CC082", lpzr:"", stap:1, hybride:true, training:[{locatie: "Eindhoven", periode:"07-07-2022, 08-07-2022, 14-07-2022 en 15-07-2022", prijs: 2095, id: "CAFA0A05F5576E3BC125875E004B739A", key: "AZ-104-220707-E"}]},
{leervorm:"B", id:"AAA64F74CB6F76CEC125853D00343484", lpzr:"", stap:2, hybride:true, training:[{locatie: "Eindhoven", periode:"08-06-2022, 15-06-2022 en 22-06-2022", prijs: 1695, id: "60826A0CC72D9F4FC125875E00352909", gaatdoor: 2, key: "BT-AZ-104-220608-E"}]
which I want to convert to a python list of dictionaries. Some answers on stackoverflow suggest using json, simplejson, ast.literal_eval
but they fail because the keys are not wrapped in double quotes. My question is , do I have to write regular expressions to wrap every key in quotes or are there other options? Thank you in advance.