Combine data from multiple queries #2736
-
Hi there! I got the use case to combine the data of two queries and group them by one property (mealCategory). This is what I got:
What happens is, that we fetch the eatable records and the energy records, check if both are there and if so, group both arrays by the property mealCategory. I am not sure, if this is the way to go or not quite right. What do you think? As an alternative I thought about using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That seems perfectly fine, but I'd do it in a |
Beta Was this translation helpful? Give feedback.
That seems perfectly fine, but I'd do it in a
useMemo
.