0

in my 'rooms' collections, each document has the fields like the following, { "createdAt" : 2020.6.4 12:00, "titleArray" : ["icecream", "summer"] }

And I want to query to check if a collection contains a document with ["icecream", "summer"] as "titleArray" field, I couldn't find a way to query by an array field itself. In other words, is there a way to passing in an array directly?

  • Please refer to this solution https://stackoverflow.com/a/51925158/9206337 – Fardeen Khan Jun 04 '20 at 13:28
  • This solution seems like to find w.r.t the value 'inside' an array field. I want to filter according to the 'array field' itself.. – Kang Seongjin Jun 04 '20 at 13:42
  • The where query would be used here but i am not sure if it accepts a non literal as a value comparison. Heres the link https://pub.dev/documentation/cloud_firestore/latest/cloud_firestore/Query/where.html – Fardeen Khan Jun 04 '20 at 14:00

0 Answers0