The section in your update code looks incorrect, you have:
elif change=="contact_no":
data[index]["contact_no"] = int(input("Enter contact : "))
with open(filename, 'w') as data_file:
data = json.dump(data, data_file,indent=4)
print("employee detail updated")
else:
print("Invalid input")
So whatever the user enters it will write back to the file. The loop will then continue until it reaches the end of the JSON entries, and print the "Invalid input" message. You need to add the break command after writing the file, but you also need an else statement for the invalid input. Something like:
elif change=="contact_no":
data[index]["contact_no"] = int(input("Enter contact : "))
else:
print("Invalid change selection")
break
with open(filename, 'w') as data_file:
data = json.dump(data, data_file,indent=4)
print("employee detail updated")
break
else:
print("Invalid employee id")
Using meaningful error messages makes it clearer what the problem is.