Playground REST API tab should display array format for order parameter
#10328 opened on Jan 22, 2026
Description
Description
The Playground's REST API tab displays the order parameter as an object:
"order": {
"orders.raw_customers_last_name": "asc",
"orders.raw_customers_first_name": "desc"
}
However, Cube's own documentation recommends the alternative order format (array) for reliable multi-column ordering:
"order": [
["orders.raw_customers_last_name", "asc"],
["orders.raw_customers_first_name", "desc"]
]
Why this matters
-
JSON object key order is not guaranteed by RFC 7159. While modern JS engines preserve insertion order, this is implementation-dependent and can break across different languages, parsers, or environments.
-
The REST API tab's purpose is to provide copyable examples for integrators. Showing the object format sets developers up for subtle ordering bugs when they copy it into their applications.
-
Consistency: Issue #7217 already requests that Vue's query builder use the array format. The Playground's REST API tab should follow the same principle.
Expected behavior
The REST API tab should display the array format that Cube recommends in its documentation, so integrators copy the reliable format.
Related
- #7217 - Vue's query builder should use alternative order format
- #773 / PR #973 - Original work to support ordered
orderspecification