title: Why is my Object undefined when I try to get a value from it
body: <p>So I get my data over a GET Request. I then load it to an Object from which I then try to get data. But when I console.log() a certain value from the Object, it says it is undefined.</p>
  
  <pre><code> Users:UserService;  
  
    ngOnInit() {
      this.GetUsers();
    }
    GetUsers(){
      var tokenUser = JSON.parse(localStorage.getItem('currentuser'));
      this.config.GetUsers().subscribe( data =&gt; {
        this.Users = data.find(x =&gt; x.username == tokenUser.username);
        console.log(this.Users) //&lt;= Works perfectly fine.
        console.log(this.Users.OrganisationName) //&lt;= gives me an undefined
      });
    }
  </code></pre>
  
  <p>Here is the part where I try to assign the value (that is undefined) from the object.</p>
  
  <pre><code> RegisterUserData(event:any){
      if(this.registerForm.valid){
        this.config.PostData(this.user).subscribe((data: UserService) =&gt; {
          this.user = {
            FirstName:undefined,
            LastName:undefined,
            Rights:"rw",
            OrganisationName: this.Users.OrganisationName,
            username:undefined,
            password:undefined,
            Email:undefined,
  
          }
        });
      }
    }
  </code></pre>