mirror of
https://github.com/strapi/strapi.git
synced 2025-08-27 10:15:59 +00:00
Change order filter to sort to reflect parameter
This commit is contained in:
parent
d3a82618b3
commit
ca7cd5e97a
@ -139,14 +139,14 @@ In order to do so, you'll need to allow access to other users (identified as 'Gu
|
||||
|
||||
To retrieve the list of products, use the `GET /your-content-type` route.
|
||||
|
||||
Generated APIs provide a handy way to filter and order queries. In that way, ordering products by price is as easy as `GET http://localhost:1337/product?_order=price:asc`. For more informations, read the [filters documentation](../guides/filters.md)
|
||||
Generated APIs provide a handy way to filter and order queries. In that way, ordering products by price is as easy as `GET http://localhost:1337/product?_sort=price:asc`. For more informations, read the [filters documentation](../guides/filters.md)
|
||||
|
||||
Here is an example using jQuery.
|
||||
|
||||
```js
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'http://localhost:1337/product?_order=price:asc', // Order by price.
|
||||
url: 'http://localhost:1337/product?_sort=price:asc', // Order by price.
|
||||
done: function(products) {
|
||||
console.log('Well done, here is the list of products: ', products);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user