class Technologie{ constructor(nom) { this.nom = nom } charger_depuis_bdd(){ fetch("../bdd/arbre.json").then((data)=>{ data.json().then((data)=>{ console.log(data) this.props = data[this.nom] this.cout = this.props.cout this.boost = this.props.boost }) }) } }