I have a problem trying to make a special model with this JSON. I actually need to get a list of organization and a list of projects.
I have no problem getting the list of projects since it's an array. But to get the list of Organizations I admit I need help to do something like making a forEach "MyContexts" and save every Organizations in a list and return her. (Maybe this is not the best way)
Here is a example of the JSON :
{
"MyContexts": [
{
"Organisation": {
"ID": "xxx",
"Name": "xxx"
},
"Projects": [
{
"ID": "xxx",
"Name": "xxx"
}
]
}
]
}
To be more precise, I need a list of String because the value will be inserted in a DropdownFormField list of value.
I hope I have made it clear for you to understand, else you can ask me question. Thank you in advance for your help.