I am trying to get an integer value of the amount field in my views tables. I am able to find the value but not return it as an int
$amount = $views
->find()
->select('amount')
->where(['date'=>$todaysdate])
->first();
echo $amount;
this echos out { "amount": 2 }. How would i just get an int variable with the 2?