The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/database > orderByKey

orderByKey() function

Creates a new QueryConstraint that orders by the key.

Sorts the results of a query by their (ascending) key values.

You can read more about orderByKey() in Sort data.

Signature:

export declare function orderByKey(): QueryConstraint;

Returns:

QueryConstraint