Fix value changing from array to object between REST function types of GET and GET with id