Good Day
My problems is I have this JSON
{"status":"success","code":200,"data":[{"ID":70}]}
That I got it from this function to make it clearer:
this._service.getDato().subscribe(
result => this.datosParaEditar(result.data)
)
When I get result.data I want to save it in an object like this
public data: IdModelo; // que es el objeto
datosParaEditar(result){
this.data = new IdModelo(result.ID);
}
but when printing it I get that result.ID is null and empty, and when printing by console only results, the JSON is printed [{"ID": 70}], I would like to know how I can save this data in an Object .