0
How do I access some position of the array below depending on the user’s choice in a select
? For example: if it selects option 11 on select
i display the value of the key installmentAmount
from position 11 to user.
{error: false, installments: {…}}
error:false
installments:mastercard:Array(12)
0:{quantity: 1, installmentAmount: 200.5, totalAmount: 200.5, interestFree: true}
1:{quantity: 2, installmentAmount: 100.25, totalAmount: 200.5, interestFree: true}
11:{quantity: 12, installmentAmount: 18.77, totalAmount: 225.18, interestFree: false}
length:12
I did, using the following: console.log(Response.installments[flag][value]. installmentAmount)
– Thiago