Implement json javascript function editing in dialog