at the moment I’m trying to understand data sources. I read through quite a lot of existing topics regarding them, but they don’t quite catch my problem.
I have almost the same use case as the manual to Custom Data Sources. I want to display authors for an article. For this I implemented a data source which receives a list with all authors. The returned result-json from the getData()-method has the id as key and the label as value.
If I access the property in fusion, only the id is displayed. Is there an easy way to access the label in fusion or do I have to implement a workaround, e.g. with writing a custom eel helper and accessing the API again? Maybe there is a way to save the data directly with additional arguments and rewriting the getData()-method?
In other cases data sources store what you are returning as value. So if you store a string identifier you will probably need an eel-helper to get the object behind the identifier.
I personally would add a key value in addition to label. There is a fallback to the array keys (as far as i know and the example relies on that) but i prefer to be explicit.