Diff and patch javascript objects