const str = 'a="123" b=3';
const parts = str.split(' ');
const result = parts.reduce((obj, part) => {
const [key, value] = part.split('=');
obj[key] = value.replace(/"/g, '');
return obj;
}, {});
console.log(result);
const str = 'a="123" b=3';
const parts = str.split(' ');
const result = parts.reduce((obj, part) => {
const [key, value] = part.split('=');
obj[key] = value.replace(/"/g, '');
return obj;
}, {});
console.log(result);