Saving a created element with multiple atttributes

You are starting with this. How would I add this data to the JSON in the first place?

How is this function being called? There are no event listeners and there are no direct function calls.