JavaScript Find the sum of array element in react native find array element matlab,find array element javascript,find array

Here I am mapping financialTransactionDetail array and populating data. Values are coming fine. Now I have to get the sum of TransactionAmount, like the length of array is 3 there are 3 TransactionAmount, I have to find the sum of 1050+1050+1050 = 3150. I tried suing load hash , but not getting proper value . Please help .

// Below is the array value 
financialTransactionDetail: Array(3)
0:
AdjustedAmount: "0"
NetTransactionAmount: "1050"
TransactionAmount: 1050
1:
AdjustedAmount: "0"
NetTransactionAmount: "1050"
TransactionAmount: 1050

2:
AdjustedAmount: "0"
NetTransactionAmount: "1050"
Status: "Unpaid"
TransactionAmount: 1050

__typename: "FinancialTransactionDetail"
///////////////////////     
<Tab heading="INVOICE SPECIFIC">
                      { !_.isEmpty(financialTransactionDetail.financialTransactionDetail) && financialTransactionDetail.financialTransactionDetail.map(
                        (data, index) => {
                         // this.state.sum+= Sum(parseInt( data.TransactionAmount));
                          this.state.transactionAmount=_.sum(data.TransactionAmount) ;
                          console.log("sum data ",this.state.transactionAmount);
                          return(
                            <View key={index} style={{flexDirection:'row', padding:10, alignItems:'center', justifyContent:'space-between'}}>
                          <View style={{paddingRight:10, marginRight:10}}>
                            <CheckBox style={styles.checkBox} color="#00678f" checked={this.state.isChecked} onPress={() =>this.handleChange()}/>
                          </View>
                          <View style={{flexDirection:'column',flex:1, padding:10, borderWidth:1, borderColor:'lightgrey', borderRadius:10}}>
                            <View style={{flexDirection:'row', alignItems:'center'}}>
                              {!this.state.isChecked && <RegularText text={`₦ ${data.TransactionAmount}`} style={{paddingBottom:10, paddingRight:5}}/>}
                              <SmallText text="From 1-Jan-2019 to 31-Jan-2019" style={{paddingBottom:10}}/>
                            </View>
                            {this.state.isChecked && 
                            <RegularText text={`₦ ${data.TransactionAmount}`} style={{borderColor: '#00fff', borderBottomWidth:1}}>
                              </RegularText>
                              /* <Input
                                value={this.state.transactionAmount}
                                onChangeText={(text) => this.setState({value1:text})}
                              /> */
                            }
                          </View>
                        </View>
Answer:1

At the moment when 'scroll' is at the very bottom, the function getUsers () is called. How to set the scroll so that it doesn't reach the end of the slider, and the getUsers () function is called. ...

At the moment when 'scroll' is at the very bottom, the function getUsers () is called. How to set the scroll so that it doesn't reach the end of the slider, and the getUsers () function is called. ...

I have a div class ".square", i want to show an alert if there is a mouse clicking outside of the div element, i can't find something similar according to mouse event on this website w3schools. ( i ...

I have a div class ".square", i want to show an alert if there is a mouse clicking outside of the div element, i can't find something similar according to mouse event on this website w3schools. ( i ...

I have this code, where I run parseString()to extract some information from an xml file function parseTime(){ var parser = new xml2js.Parser(); var data = fs.readFileSync('C:\\Temp\\tasks\\acis\\110-...

I have this code, where I run parseString()to extract some information from an xml file function parseTime(){ var parser = new xml2js.Parser(); var data = fs.readFileSync('C:\\Temp\\tasks\\acis\\110-...

I'm sure this is a duplicate, but I couldn't find the right search terms to find an answer. I'm trying to use hasOwnProperty() to determine if a function exists on an object or not. I know there are ...

I'm sure this is a duplicate, but I couldn't find the right search terms to find an answer. I'm trying to use hasOwnProperty() to determine if a function exists on an object or not. I know there are ...