How to filter from two different arrays in react-native?
问题 I need to display a history of expenses grouped using month and each month header should display the total expense of that month. I want a SectionList to display each months expenses and I'm using react-native firebase to store the data. But how do I filter the transactions based on month and display it under corresponding month header? componentDidMount() { //Querying firestore() .collection('expenses') .orderBy('dateTime', 'desc') .get() .then((querySnapshot) => { const expenses = [];