How to convert a string representation of an array of objects to an array of objects in javascript?

I have an string of a array of objects that looks like this

"[{'key1': 'val1', 'key2': 'val2', 'key3': 'val3'}, {'key1': 'val1', 'key2': 'val2'}]" 

I whant to convert to a array of objects like this:

[{'key1': 'val1', 'key2': 'val2'}, {'key1': 'val1', 'key2': 'val2'}]

can someone help with that?