I have a small code where I read a json to get the current online version of my data the idea is then compare with the local version saved with sqlite and if it is smaller then download the rest of json and update my BD.
this.http.get('https://mi.json').subscribe(
data => {
this.VO = data['numero'];
console.log(this.VO);
}
);
console.log(this.VO);
I know it may seem silly but I can not understand why I can not use the value of my variable outside the observable, that means if or if within the positive response of the same I should consult my BD and compare the data or is there another way? to give me a basic idea helps me to continue from now thanks