How do I order results / switch position from API response?

This question was asked by one of our community members on Discord:

I can’t figure out why these values are switching positions?

In the body of a POST request, I define the values like this

"shipping_name: "top",
"customer_email_bottom: "bottom"

When the request actually runs the body of the request in the logs is switched to

"customer_email_bottom": "bottom",
"shipping_name":  "top"


Can anyone point me in the right direction?

The order of data in JSON objects has no guaranteed structure (compared to an array) because it’s an unordered list. So it’s not possible to order the response from an API.