Convert Entity to array