Here is the javascript. This works perfectly and returns the array of objects, if the html inputs are hardcoded. However for some reason if these inputs are appended it does not work, and for that object all values are undefined.
var companyOwners = $('.company_owners_details').map(function() {
return {
owner_first_name: $(this).find('[name="owner_first_name"]').val(),
};
}).get();