Convert string with bracket notation to dot property notation for Node.js and the browser.