Hi I have a requirement in which i am passing the data from parent to child component and need to fetch the particular data in the track property in child component.
Parent Component.
@track info = [];
Info.push({
name:"Priya",
Age:"12",
School:"Asvidya",
City:"Delhi"
});
<C-child info = {Info} ></child>
Child Component.
@track priyaAge;
@track informationgirl = [];
@api
get info() {
return this.informationgirl;
}
set info(value) {
this.informationgirl = value.detail;
}
As per req i just want to pick out the age of priya from the incoming data and store in the @track priyaAge in child component.