database.rules.json
{
"rules": {
"meetings" : {
".read": true,
".write": true,
".indexOn" : ["date"]
}
}
}
Request URL
"https://{baseURL}/meetings.json?orderBy=date&equalTo=20181005"
Error Message error: "orderBy must be a valid JSON encoded path"
But
"https://{baseURL}/meetings.json"
No Error. What did I do wrong? Plz help me.
The value of the name
parameter in your URL needs to be enclosed in "
quotes. So:
https://{baseURL}/meetings.json?orderBy="date"&equalTo=20181005
Depending on the way you store the values of the date
property, the value of the equalTo
parameter may also need be enclosed in "
quotes. If you store date
as a string, it needs to be:
https://{baseURL}/meetings.json?orderBy="date"&equalTo="20181005"
For more on this, read the Firebase documentation on querying using the REST API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With