Manipulating JSON JS

I want to know why this works, but not to create

obj.teste = {id: 1}; // works to build

obj.teste.id = 1; // This changes, but it can not be created