remove json from input when field is removed