def role_data_from_results(res, rolename)
      roles = res['roles']
      roles.each do |role|
        return role[0].to_i if role[1] == rolename
      end
      nil
    end
def role_data_from_results(res, rolename)
      roles = res['roles']
      roles.each do |role|
        return role[0].to_i if role[1] == rolename
      end
      nil
    end
Extract the role data for rolename based on the role result object
 @param [Hash] res result from a request to /roles
 @param [String] rolename
 @return [Object] Integer, String, Array, Hash depending on the user data