![見出し画像](https://assets.st-note.com/production/uploads/images/166748905/rectangle_large_type_2_c054d4560da7ec5024925c0a3d115a1e.png?width=1200)
【Wix プログラミング】descending( )
query結果を降順にできるメソッド
wixData.query('calendar').descending("year").eq('day',day).eq('month',month).find()
.then( results => {
上記のように使うことができる。
queryの後ろにascending( )を付ければ昇順にすることもできる。
いちいち配列に出力してsortかけなくていいのでかなり楽。
いいなと思ったら応援しよう!
![えう](https://assets.st-note.com/production/uploads/images/57047867/profile_2987a60756c3f55cab325cbc9bb0ae41.jpg?width=600&crop=1:1,smart)