I'm having some trouble on displaying data from a JSON file like this one:
Currently "checked": null. I want to do checked = true in steps array using the forEach loop.
Here is my JSON data:
{
"id": 4,
"process": {
"id": 24,
"name": "test-1Process",
"description": "Unknown",
"steps": [
{
"id": 6,
"title": "test1-process",
"description": "test1 FDescriptin",
"assetURL": "",
"checked": null
},
{
"id": 7,
"title": "test1-step2",
"description": "step2 description",
"assetURL": "",
"checked": null
}
],
"possibleEndStates": [
{
"id": 1,
"name": "test2-tesp2"
},
{
"id": 1,
"name": "test2-tesp2"
}
]
},
"user": {
"id": 5,
"firstname": "john",
"surname": "edd",
"email": "[email protected] ",
"companyAdministrator ": false,
"roles ": [
{
"id ": 2,
"name ": "test1 - role ",
"department ": {
"id ": 2,
"name ": "test1 - department ",
"description": null,
"company": {
"id": 2,
"name": "sd",
"address": "default",
"timezoneId": "default",
"logoURL": "default"
}
}
}
]
}
}
Then push in a steps variable steps array.
Please, give me some suggestions.