Spirit of the law

Something as it is meant to be and not as it is stated exactly, what the people who made the law wanted to achieve.

The judge tried to follow the spirit of the law and not only as it was written.