The JSON stringify() static method takes an object and converts it to a string in JSON format.

    
    const user = {
      name: "Zeke",
      email: "zeke@gmail.com",
    };

    const userStr = JSON.stringify(user);

    console.log(userStr);
    // "{\"name\":\"Zeke\",\"email\":\"zeke@gmail.com\"}"

    console.log(typeof 'userStr')
    // "string"

    console.log(userStr.name)
    // undefined