question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to disable sorting before encoding?


data = { pair: 'USD_RUB',
  quantity: 234,
  price: 59.4,
  type: 'buy'
 }

query-string.stringify(data) -> pair=USD_RUB&price=59.4&quantity=234&type=buy

and I need so:
pair=USD_RUB&quantity=234&price=59.4&type=buy

please help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
olsonpmcommented, Oct 28, 2017

Objects don’t have an inherent order. Your expected output is thus engine dependent and prone to errors in chrome if any keys are numeric. Sorting removes this ambiguity and provides deterministic behavior which is a good thing.

1reaction
sindresorhuscommented, Feb 3, 2018

In the latest version, you can now disable sorting or provide your own sorting function.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove sorting option from DataTables? - Stack Overflow
First, try setting "bSort" to false. Note that, this will disable sorting all around. $('#jTable').dataTable({ "bSort" : false } );.
Read more >
ordering - DataTables
Feature control ordering (sorting) abilities in DataTables. Description. Enable or disable ordering of columns - it is as simple as that!
Read more >
Disable Sorting On Specific Columns In Datatable
In this example I will show you how to disable sorting on specific columns in datatable. If you want to remove sorting arrow...
Read more >
How to Disable Sorting on a Worksheet - VizWiz
It's quite simple! All you have to do is turn off the sort controls. In this short Tableau Tip, I show you how...
Read more >
Solved: How to disable sorting in Table visual
Solved: Hi, I want to disable sorting on power BI table visual.By default table needs to be sorted based on first column. How...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found