<form class="form">
<div class="container">
<label>URL</label>
<input id="data-url" value="val" type="text" />
</div>
</form>
const formData = new FormData(document.querySelector('.form'));
console.log([...formData])
It is simplified version of HTML, but basically label and input tags are descendants of form. I am trying to get value of input and name of the label using FormData API, but it is empty for some reason.