my angular application will recive object's from backend
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"id": 160,
"title": null,
"rate": 5,
"author": "anonymous",
"content": null,
"review": "here is the review",
"url": "https://blog.com/?p=198",
"fake": true,
"tags": [
"thi"
],
"comments": [],
"created_at": "2020-06-13T20:24:32.434131Z",
"advertisement": {
"id": 55,
"created_at": "2020-06-13T20:24:32.432084Z",
"title": null,
"url": null,
"advertizing_content": null
}
},
JSON data structure from backend i have converted array
var dat:any=JSON.stringify(backenddata);
this.z = backenddata["results"][0];
and seleted results
{
"id": 160,
"title": null,
"rate": 5,
"author": "anonymous",
"content": null,
"review": "here is the review",
"url": "https://blog.com/?p=198",
"fake": true,
"tags": [
"thi"
],
"comments": [],
"created_at": "2020-06-13T20:24:32.434131Z",
"advertisement": {
"id": 55,
"created_at": "2020-06-13T20:24:32.432084Z",
"title": null,
"url": null,
"advertizing_content": null
}
},
i want to fetch all the tags in every object
console.log(this.z.tags)
i just got "undefined" in console
I tried
Object.values(tags);
i tried everything regarding this objects part objects.values,keys and all when i tried console.log(object.values(y)[8]);(y here is the json object) i'm just getting a value of first object's tag i want to loop all the objects segregate those tags and save it in variable
refereed many stack overflow thread's but its of no use i have no clue what exactly is wrong https://www.youtube.com/watch?v=23ZjKQL-2E4&t=509s
also tried this tutorial still its of no use
i just want to fetch all the tags of every object of thatjson response and save it