how to convert a variable to object in javascript code example Example: js string to object JSON.parse()