title: Can't get the data from array react and Firestore
body: <p>How can I access the value exist from an array? I think I didn't pass the array inside? Any help or advice</p>
  
  <pre><code>var isExist = this.props.isFavorite(this.props.code);
  console.log(isExist)
  </code></pre>
  
  <p>I have this variable isExist containing the response from console below.</p>
  
  <pre><code>[]
   client: [id: "LvR05w9v9xrC3r4V1W8g", exist: true]
   length: 1
   _proto_:Array(0)
  </code></pre>
  
  <p>How can I access the exist in my array? When I tried isExist[0].exist I'm getting an error. Any help?</p>
  
  <pre><code>isExist.exist = Undefined 
  isExist[0].exist = TypeError: Cannot read property 'exist' of undefined
  </code></pre>
  
  <p>favorite method where I am accessing and pushing data to the array</p>
  
  <pre><code>export const isFavorite = (data) =&gt; dispatch =&gt; {
    let exist = []; 
  
    var clientQuery = firebase.firestore().collection(path).where('client_id', '==', data);
    clientQuery.get().then((querySnapshot) =&gt; {
      querySnapshot.forEach((doc) =&gt; {
          var data = [];
          data.id = doc.id;
          data.exist = doc.exists;
          exist.push(data)
       });
   });
   return exist;
  }
  </code></pre>