update json and index