You can learn about storing values in variables here. And then about conditionals here.
·····················································································································
Need help? How to Ask Great Questions
Debugging A Project
API JSON Tutorial