Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Accessing values from a Map

$
0
0

I'm struggling to get the string values from a Map<string, List<string>> object. The object contains this information:

{"thisKeyName": [Array]}

The [Array] contains something like this:

["Contact 1", "Contact 2", "Contact 3"]

I'm able to access the [Array] values of the object like this:

let contactCards = currentUser.contacts; // <- this is the Map objectconst ids = [];contactCards.forEach(folder => {  folder.forEach(contact => {    ids.push(contacts);  });});

However, I want to access the "ThisKeyName" value to put it on another array. How can I archieve this?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>