Convert response to object