I am looking to store a list of unique string (hence Set) and wanted to retrieve the value based on the index. I used get(index) But it turned out it returns undefined. So it seems I did not understand Set well.
In case value needed to be retrieved do we have to convert it back to the array and then only read it or with "get(index)" it can be achieved?
Also, I have checked Set tests to understand get(index) but still not clear.
const { Set } = require('immutable');
const set = Set(["ab", "cd", "ef"])
console.log(set.get(1)) //logs undefined
console.log(set.toJS()[1]) //logs "cd"