简体   繁体   English

如何获得此级别的密钥?

[英]How do I get the key of this level?

在此处输入图片说明

Hi, I have this problem in query in Firebase. 嗨,我在Firebase中的查询中遇到了这个问题。 The orderbykey() and orderbychild() doesn't work. orderbykey()和orderbychild()不起作用。 How do I query this one? 我该如何查询?

cheers, thanks in advance. 干杯,谢谢。

Code Snippet: 代码段:

    Query mRef = mRootRef.child("Messages").orderByKey().equalTo(mAuth.getCurrentUser().getUid());
    Query mRef = mRootRef.child("Messages").orderByChild("commWith").equalTo(mAuth.getCurrentUser().getUid());

在此处输入图片说明

i have just re design my JSON at firebase like in the image below, so that i could simply get the unique keys per data 我刚刚在firebase上重新设计了JSON,如下图所示,这样我就可以简单地获取每个数据的唯一键 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Android 上以百分比形式获取设备音频电平? - How do I get the device audio level in percentage on Android? LibGDX-如何使屏幕显示“ LEVEL COMPLETE”? - LibGDX - How do I get my screen to display “LEVEL COMPLETE”? 我如何获取 push() 密钥并同时存储密钥 - How do i get a push() key in and store the key at the same time 如何获取添加到Firebase的项目的生成密钥 - How do I get the generated key for an item add to Firebase 如何获取动态JSON数组中每个对象的密钥? - How do I get the key for each object in a dynamic JSON array? 如何在Woocommerce Rest API中获取Tokenization密钥? - How do I get Tokenization key in Woocommerce Rest API? 如何获取发送按键事件的键盘名称? - How do I get the Name of Keyboard sending key events? 如何让我的 ionic 应用程序面向 API 级别 28 及以上 - How do i get my ionic app to target API level 28 and Above 如何获取Android的密钥别名文件? 我需要吗? - How do I get the key alias file for Android? Do I need it? 如何从 Json 文件中获取随机密钥以便显示其值? - How do I get a random key from Json file so that I can display its value?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM