I have a method which is returning a value and I'm assigning the return value to a variable. the function returns proper value but the variable is not set with the return value. But if I set `this.size` inside the function I get proper value. I'm calling `this.searchData` function from many functions, So I cannot do this(in this case I will have to use multi `if` statements), So is there any way to get the return value from the function. I thought to use `timeout` is there any other way around?

```
searchSize(event): void {
    this.sizes = this.searchData(event, AppConsts.size);
}

searchData(event, property): any {

    this._serviceProxy.getProperties(
        property,
        event.query,
        event.query
    ).subscribe((result) => {

        console.log(result.items);
        return result.items;
    });
}

```