Data formatting, splitting objects & deleting key's/values
You can use Object.entries() and .filter() with RegExp /date|delivery|residential|secondary|shoe/ and .test() to filter data from data, create a function expecting property name and optional separator character to concatenate to property name to replace in returned object spread as values passed to second parameter of Object.assign()



const data = {
  agency: "",
  agent: "",
  agent_email: "",
  agent_phone: "",
  date_of_birth: "2007-05-30",
  delivery_address: "address - 1",
  delivery_city: "city - 1",
  delivery_country: "PE",
  delivery_state: "state - 1",
  delivery_zipcode: "zip_code - 1",
  facebook: "",
  instagram: "",
  name: "Dustin Peter",
  primary_email: "wagnerpeter@bailey-schroeder.example.com",
  primary_phone_number: "+31622064234",
  residential_address: "address - 0",
  residential_city: "city - 0",
  residential_country: "LC",
  residential_state: "state - 0",
  residential_zipcode: "zip_code - 0",
  secondary_email: "garzajustin@vasquez.example.com",
  secondary_phone_number: "+39349330249",
  shoe_size: "38",
  snapchat: "",
  twitter: "",
  url: "",
  youtube: ""
}

let [filters, filtered] = [
  ['date', 'delivery', 'residential', 'secondary', 'shoe']
, (data, props) =&gt; Object.entries(data)
  .filter(([key, value]) =&gt;
    new RegExp(props.join`|`)
    .test(key))
];
  
const handleProps = (prop, r = '', props = filtered(data, filters)) =&gt; 
  ([...p] = props.filter(([key, value]) =&gt; 
    new RegExp(prop).test(key)).map(([key, value]) =&gt; 
    (r ? {[key.replace(new RegExp(prop + r), '')]: value} : value))
    , r ? p : p.pop());

const dataSet2 = {
 date_of_birth:handleProps('date_of_birth')
, delivery_address: Object.assign({}, ...handleProps('delivery', '_'))
, residential_address: Object.assign({}, ...handleProps('residential', '_'))
, secondary_email: handleProps('secondary_email')
, secondary_phone_number: handleProps('secondary_phone_number')
, shoe_size: handleProps('shoe_size')
};
               
console.log(dataSet2);