If the defendant or other person on his behalf at any time before judgment cause a bond to be executed to the plaintiff, by one or more sureties, possessing the same qualifications required of sureties on bonds for the issuance of attachment, to the effect that the defendant shall perform the judgment of the court, the attachment in such action shall be discharged and restitution made of any property taken under it or the proceeds thereof. Such bond shall also discharge any garnishee from liability in said cause.
NMS § 42-9-30