I have a contact Form
in my App. I am adding email field dynamically
when user clicks on add Email button
. if user may or may not enter the value after email field generated when he clicks on add Email button.
If user not enter the value of Email and he clicks on submit, the angularjs sending data as emails[{"key":"Work","value":"[email protected]"},{"key":"","value":""}]
to server.
How to remove these type of empty objects (like {"key":"","value":""})
while submitting the form to server.