I'm facing an issue with accessing a variable object within my main object. I am able to access 'start', 'end', and 'category' without any problem, but I am unsure how to access the variable Object in my Angular web app development project (not AngularJS).
The object is retrieved from...
<form #f="ngForm" (ngSubmit)="onSubmit(f)" novalidate>
<md-slider
ngModel
required
#k="ngModel"
[name]="k"
[disabled]="false"
[invert]="invert"
[max]="10"
[min]="3"
[step]="1"
[thumb-label]="true"
[ngModel]="value"
[vertical]="vertical">
</md-slider>
</form>
and k is initialized in ngInit
, but my challenge lies in accessing this 'object'.
Object {start: "2011-01-01", end: "2017-06-27", [object Object]: 5, category: ""}
Thank you!!!
RE-EDIT I am trying to access my JSON data in this function.
getBestSeller(filter: JSON) {
const k = filter['k'];
console.log("object -> ", filter['object']) //ERROR, 'object' undefined
//...
}