Hello, I’m trying to populate my drop down with data from the API. While the data is being returned correctly, I can’t get the data to display correctly. Thank you in advance.
This is what it looks like in the app right now
And this is what is being returned from the API
How do I need to format the response so it recognizes it? I tried putting it in brackets like this [ “optiona”, “optionb” ] but that didn’t work either.
Your api project should return a proper json data. If you want these two options for example, you can return this: [ { "optionname": "optiona" }, { "optionname": "optionb" } ]
If you create this response and return it →
This is how it will be initialized: