FunQueryThe FunQuery takes the query() with the data and fields to query for.
MethodDescriptionparameters
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
const data = [ { name: 'John', age: 20, country: 'USA' }, { name: 'Alice', age: 30, country: 'Canada' }, { name: 'Bob', age: 20, country: 'USA' }, { name: 'Eve', age: 25, country: 'Australia' } ];
#
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