In my current Angular project I send a JSON file to a server and the server gives me back a modified JSON file. The new JSON file should be displayed in a tree.
My current problem is that I cannot read the data from the new JSON. Whenever I want to display a JSON Object, I always get the error:
[object Object]
Post request:
public sendJSON() {
this.http.post('url', this.combineJSON,{headers:{'Content-Type': 'application/json'}}).subscribe((data: Device) => {
console.log("Test Output: " + data);
})
}
I defined a model to work with the response:
export class Device {
orderNumber: number;
deviceTypeId: number;
swRevision: string;
hwRevision: string;
}
Where is the problem here that the data is not displayed correctly?