Update jsonpatch.js

Replace recursively to avoid errors when there are multiple '~1' (/) or '~0' (~) in the same split fragment.