FunQueryThe FunQuery takes the query() with the data and fields to query for.
Method | Description | parameters |
---|---|---|
query() | It accepts an object containing your query | `data:Array | Object , fields:Object` |
#
Parameters
data (Array or Object): The data to be filtered. It can be an array of objects or a single object.
field(Object): The filter criteria to be applied to the data. It should be an object with property-value pairs representing the filter conditions.
#
Consider the data
#
Make Query
Let's query for { age: 20 , country:'USA' }to get the documents with the age `20`and country `USA`
React / Next.js Show Source Code