Simple javascript data observer