Hi !
Trying to deal with objects... to learn...
I've been trying things in my matrix props.
For example, this in the props.onValue :
Object.entries(Dossiers).forEach(([k,v]) =>
getIndex(this) == v ? console.log('yep') : console.log('non non non...') )
That's ok.
But now, i don't understand why this doesn't work (that's not in props.onValue ):
const Dossiers =
{
"Basses" : 0,
"Bois" : 6,
"Cordes" : 12,
...
"Cuivres" : 33
}
var K = Object.keys(Dossiers)
var V = Object.values(Dossiers)
V.forEach( (el,i) => props.label = $ == el ? K[i] : 'pistes' )
All labels are set to 'pistes'.
What's wrong here ?
Thank you