I would like to know/retrieve/return the value of short_name (example 123) if i have the value of type (example street_number) as information
Array of object :
address = [
{
'short_name': '123',
'type': 'street_number'
},
{
'short_name': 'principal'
'type': 'route'
},
{
'short_name': 'Washington'
'type': 'city'
}
]
I tried mapping, filtering, valueOf(), includes('street_number'), Object.entries, chaining those method, etc.
I would like to put the result in a variable so i can use it later on.
const part_of_address = ... ... ...