Query on multiple values in Firebase, similar to IN() SQL functionality

后端 未结 2 1087
南旧
南旧 2020-12-10 22:02

I have an array that looks like this:

validZipCodes = [
  \"84606\",
  \"84605\",
  \"84601\"
]

I\'m querying some data like this:

2条回答
  •  误落风尘
    2020-12-10 22:33

    The Firebase .equalTo() documentation states that the value argument should be one of the following types: String, Number, Null, or Boolean.

    • You are getting an invalid data-type error because you are not passing one of these types.

    • There is no method like .inArray() (i.e. querying for equalTo multiple values).

    You can review all of the Firebase Query Methods in the Query documentation, which also suggests:

    Read our documentation on ordering and querying data for more information and examples.

提交回复
热议问题