Added getBodyObject method to directive.