Am trying to assign payment_term value to the state.payment_terms using JSON.stringify(). But its giving value with in double quotes in the dropdown component. How to avoid the extra double quotes.
Please find my code below.
<select name="payment_terms" value={ this.state.payment_terms != undefined ?
this.state.payment_terms :
this.state.payment_terms=JSON.stringify(payment_term) } >
{payment_terms}
</select>
Am populating payment_term with the below code.
if(this.state.Payment_Term != null)
{
var payment_terms = [];
var payment_term;
for( var i=0; i<this.props.Payment_Term.length; i++)
{
if( this.state.Payment_Term[i].Payment_Detail != null )
{
payment_terms.push( <option value=
{this.state.Payment_Term[i].Payment_Detail}>
{this.state.Payment_Term[i].Payment_Detail}</option> )
}
payment_term = this.state.Payment_Term[0].Payment_Detail;
}
}

JSON.stringify?PaymentTermobject, specificallyPaymentTerm.Payment_Detail.