0

For example - (For a library book system) I have a collection name "Users" with documents named "{uid}". Each document have fields such as - name, rollNo,.... , issuedBooks:[{bookName, bookId, submissionDate, submittedDate}]

My question is - can I query such that it gives me all the documents with submissionDate is equal to today(Timestamp)

note - issuedBooks is a list of Objects where submissionDate is one of the field in that object

programming language - any (JS preferable)

Database Structure Image - Firestore Database Structure

  • I want to query using submissionDate
  • Please edit your question and add your database structure as a screenshot and indicate the exact fields you need to use in your query. – Alex Mamo May 04 '22 at 07:05
  • As you will see in the answer to the duplicate question, it is not possible to check if an array of objects contains an item with a specific value for a property. What you can do is to duplicate the data in such a way the query is possible: just create a second array which only contains the `submissionDate` field. Note that it's up to you to keep the two arrays in sync. – Renaud Tarnec May 04 '22 at 07:21
  • Thank you for your time.. It would really help me out. – Chinmoy kr May 04 '22 at 07:28

0 Answers0