0👍
✅
What you can do is to find in your banks
array the ledger_object_type_sub_id
who is equal to your bank_name_id
.
get_existing_bank_id: function(bank_name_id) {
console.log(this.banks.find(bank => bank.ledger_object_type_sub_id === bank_name_id).ledger_object_type_sub_name);
}
Here is your fiddle update with the working solution : https://jsfiddle.net/sjh038w9/
👤BTL
Source:stackexchange.com