I'm trying to dynamically add lines to a API call's body, I have a + button that is working to add additional lines. But I'm lost on how I can actually add those additional lines to a specific body text. I'm pretty new to all of this so baby steps are appreciated
I have boxes and drop down values in the application itself and have mapped them to the values within the dhcpOptions body text. This works perfectly fine, the problem is that we always have to use all 3 options. So if I wanted to only use 1 row of "type,code,value" I would have to go into the app itself and remove the additional text from the dhcpOptions body.
To help this I created a +/- minus button that adds/subtracts rows based on what you need.
Issue 1 - The new values of that button look to be exactly the same as the original. Meaning if my original row was DHCP_code_input1 when I click the + button it will create another box of the same name, DHCP_code_input1.
Issue 2 - How do I place the newly created values into the correct header. I had messed around with JS using the push command but regrettably my JS is pretty weak so I hit a wall pretty fast. Below is a image I was using for testing. This kind of worked but it just put the same values at the end of the original string.