How to access array value of a class.