As someObjAsString is object, then you can use keyvalue pipe:
<div *ngFor="let item of dataList.someObjAsString | keyvalue">
Key: <b>{{item.key}}</b> and Value: <b>{{item.value}}</b>
</div>
Usually ngFor is used to iterate through arrays.
UPDATE:
As your object is stored as string, then we can use json.parse() to construct the JavaScript value or object:
data = {
id: 1,
someObjAsString: '{"p1":"a", "p2": "b"}',
anotherObj: '{"p1":"a", "p2": "b"}'
};
ngOnInit(){
for (const key in this.data) {
if (this.data.hasOwnProperty(key)) {
this.data[key] = JSON.parse(this.data[key]);
}
}
console.log(this.data);
}
And HTML:
<div *ngFor="let item of data | keyvalue">
Key: <b>{{item.key}}</b> and Value: <b>{{item.value | json}}</b>
<div *ngFor="let someObj of item | keyvalue">
someObj Key: <b>{{someObj.key}}</b>
and someObjValue: <b>{{someObj.value | json}}</b>
</div>
</div>
A complete workstackblitz example can be see here.