You are doing it wrong. Object properties are unsorted by definition. See https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order

Your solution can break easily and I would be surprised if it worked it all browsers.

What you actually want to do is to define the order of properties, e.g:

    const propertyOrder = ['name', 'phone', 'email'];

and render the properties by that order instead of using a random ordering of `Object.keys`.