I added type="button" to all buttons. Not having a type is equal to type="submit" so it was submitting my form every time I tried to modify the json object.
A button element with no type attribute specified represents the same thing as a button element with its type attribute set to "submit"
https://www.w3.org/TR/html-markup/button.html
I added type="button" to all buttons. Not having a type is equal to type="submit" so it was submitting my form every time I tried to modify the json object.