I'm using the following getter in my Vuex store to get the datasets from my state.
getDatasets: state => {
let datasets = [];
state.observations.forEach(obs => {
if (!datasets.includes(obs.dataset)) {
datasets.push(obs.dataset);
}
})
return datasets;
}
However, this return as many datasets as observations in my state whereas it should return only one dataset.
I believe this is due to the __obs__ field added by VueJs that is different for each dataset object.
Did I misunderstood something and how could I fix this?