0
assigner un objet:js destruct un sous-objet objet interne
const info = { name: 'Peter', location: { province: 1, city: 2 } };
let { name } = info;
console.log(name); // 'Peter'
// then how to get location.province
let { 'location.province': province } = info;
console.log(province); // 'undefined'
comment j'obtenir location.province sous-objet par déconstruire ???
'' 'let {province} = info.location;' '' – Wainage
@Wainage merci, peut-être un peu mieux –