Compute delta between two javascript objects