String.replace for JavaScript objects (and JSON).