getItems

Find and get objects, this is for multiple results

getItems({key: value, ...} , (data)=> {}, (error)=> {})

How to use:

my_collection.getItems(
    {key: value},
    (data) =>  // data array can access here,
    (error) => alert(error) 
);

Arguments:

Example:

import React,{useEffect} from 'react';
import {Text} from 'react-native';
import {Pleex} from 'pleex';

const App = () => {
  
  // Create collection
  const my_collection = Pleex.collection('myCollection');
  
  // Get all data saved
  my_collection.getItems(
    { age: 12 },
    (data) =>  // data array can access here,
    (error) => alert(error) 
  );
  
  return (
    <>
      <Text>Try getItems api</Text>
    </>
  );

};

export default App;

Tips:

  1. if pleex don't find anything its return [ ], empty array

Last updated