When the judgment for the cancellation of record of a mortgage, or a certified copy thereof, is filed or recorded, with the county clerk or the office of the register of deeds and mortgages, if any, of the county in which the mortgage is of record, and the money due on the mortgage, if any, deposited as required by the judgment, the county clerk or register of deeds and mortgages shall discharge and cancel of record the mortgage, and shall enter on the margin of the record or registry of the mortgage, and opposite thereto the words "canceled by judgment", entering the date of the judgment and filing, or recording the certified copy as above provided.
N.J.S. § 2A:51-2