I currently have a backend query, and store the collection-I-am-querying’s field keys in a global const object which I use in the query. I want to use this global const object of field keys in the front end to access the data of the items that result from the query.
Any recommendations on how to do this? I do not want to redeclare the object in the frontend as I do not want to duplicate code. I also tried created a backend function that returns the field keys object and calling it from the frontend, but this takes too long. Any help would be appreciated