Currently, I am working with angular 2.0 and I have a json object that is returned by a method in the following way.
this.propertiesService.addSeriesToChart(this.testId).subscribe(result => {
this.result = result;
});
The addSeriesToChart() method is located in a service which returns a json object.
Within the returned result, I need to assign default values to some of the null values. My attempt looks like this:
if (this.result != undefined && this.result != null) {
this.result.json().channel.mark = "ABC"
However, the mark parameter inside the json object does not get set to "ABC", it remains null. Am I making a mistake here?