I have the following JavaScript Array:
supportedCurrencies = [
{
"currencyCode":"USD",
},
{
"currencyCode":"CAD",
},
{
"currencyCode":"GBP",
}
]
My goal is to get the currencyCode values and create an array (ex. [USD, CAD, GBP...] and then join these arrays with | ...to get final string output USD|CAD|GBP
supportedCurrencies.map(key => {
// Map through JS object
// Get currencyCode values
// Create new array with values
// Join these values with |
})