Im trying to get my json data to array and i need to control it how can i do that can u guys please help me ?
login()
{
let hash = CryptoJS.SHA256(this.user_password).toString(CryptoJS.enc.Hex);
let data:Observable<any>;
data = this.http.get('localhost/api/?loginUn='+this.user_name+'&password='+hash);
data.subscribe(result=>
{
this.items = result;
})
if(this.items['state'] == "yes")
{
console.log("data");
}
else
{
console.log(this.items);
console.log("no data");
}
}
json data
{"state":"yes"}