Add getAttr
Remove duplicate code
Remove duplicate code on getData
remove get Field value
create selectObj for reuse