In my JSON
data, there is a variable
named address
that contains multiple objects (i.e., multiple addresses). I am displaying these multiple addresses
as shown in the following image:
https://i.sstatic.net/1AG34.png
- When clicking on a specific
address
(e.g., addressType: Business), the values of thataddress
(such as postalCode and City) are displayed in the input fields below. Afterediting
theaddress
, upon hitting the add button, the editedaddress
is saved, but theinput fields
should be cleared, as shown in this image:
https://i.sstatic.net/NXCH0.png
However, I am currently unable to clear the input fields without refreshing the page in order to add a new address.
- By clicking on delete, I should be able to delete that particular address.