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

Ramda: Filter Object With Dynamic Keys

$
0
0

I have this object:

const data = {"avaiable_items": {"1": [201259, 201303],"2": [201303], "3": [201259]},"items": [{"id": "201259","name": "ABC"},{"id": "201303","name": "DEF"}]}

I need to filter "items" based on "avaiable_items" dynamic keys

Example if want to filter object based on selected avaiable_items i.e "1", the result will be:

{"item": [{"id": "201259","name": "ABC"},{"id": "201303","name"}]}

Viewing all articles
Browse latest Browse all 6290

Trending Articles



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