I'm trying to extract key value pairs from a string using regex. Here's an example string:
"{format=svg, width=383, height=480, transform=[40, 40, 40, 40], scaleX=1, scaleY=1}"
How can I convert this string into an object with the following format? Any help is appreciated!
{
format: 'svg',
width: 383,
height: 480,
transform: [40, 40, 40, 40],
scaleX: 1,
scaleY: 1
}