如何使用URL在Firebase中订购数据?

时间:2017-03-09 05:28:52

标签: javascript firebase firebase-realtime-database

Firebase网址

https://xxxxx.firebaseio.com/cms/file.json?print=pretty&orderBy= “$优先”

我添加了参数orderBy并尝试遵循文档的所有组合,但它没有触发。我希望我的数据按最后一个条目排序我在我的数据中也有timeStamps transCreation

{
  "00hym5km2tf08s38fr-ivjgnsw6" : {
    "notes" : "",
    "transCreation" : "11/15/2016, 4:14:07 PM",
    "transId" : "00hym5km2tf08s38fr-ivjgnsw6",
    "transModified" : "11/15/2016, 4:14:07 PM",
    "transNameArabic" : "استخدم كعنوان الدفع الافتراضي",
    "transNameEn" : "Use as my default billing address",
    "transStatus" : "FIXED"
  },
  "00x6lc2f840fubygy14i-ivam9zl8" : {
    "notes" : "",
    "transCreation" : "11/9/2016, 11:41:25 AM",
    "transId" : "00x6lc2f840fubygy14i-ivam9zl8",
    "transModified" : "11/9/2016, 11:41:25 AM",
    "transNameArabic" : "حالة طلب الشراء",
    "transNameEn" : "Order Status",
    "transStatus" : "FIXED"
  },
  "00y5h85rhhz4niza1yvi-ivan9o5w" : {
    "notes" : "",
    "transCreation" : "11/9/2016, 12:09:10 PM",
    "transId" : "00y5h85rhhz4niza1yvi-ivan9o5w",
    "transModified" : "11/9/2016, 12:09:10 PM",
    "transNameArabic" : "يرجى تعيين طريقة الشحن",
    "transNameEn" : "Please specify a shipping method",
    "transStatus" : "FIXED"
  },
  "01aw-ixzxigpa" : {
    "notes" : "",
    "transCreation" : "1/16/2017, 2:09:35 PM",
    "transId" : "01aw-ixzxigpa",
    "transModified" : "1/16/2017, 2:09:35 PM",
    "transNameArabic" : "تم تأكيد طلبيتك بنجاح",
    "transNameEn" : "YOUR ORDER HAS BEEN SUCCESSFULLY PROCESSED",
    "transStatus" : "FIXED"
  },
  "01b0l16b6td3usxajor-ivaucr54" : {
    "notes" : "",
    "transCreation" : "11/9/2016, 3:27:31 PM",
    "transId" : "01b0l16b6td3usxajor-ivaucr54",
    "transModified" : "11/9/2016, 3:27:31 PM",
    "transNameArabic" : "تشغيل تنبيهات السعر",
    "transNameEn" : "Sign up for price alert",
    "transStatus" : "FIXED"
  }
}

我可以通过网址执行此操作吗?

0 个答案:

没有答案