❔ simplification
iam wondering if there is a way to simplify following example for readability using linq
9 Replies
i have around 120 properties in the true thing but cant share due to it being sensitive data
yList is never used?
oh
the second property is supposed to be yList
some kinda zip probably?
actually apiData is a dictionary, no?
Just asking: Do you really want to add each combination of keys and values? Because like that, you are combining each key with all values
its a dict<dict<string, int>, dict<JsonElement, List<object>>>
yes thats supposed to happen
Aight
Not sure if there's much to simplify tho. This is readable enough imo. However you could use
Since this is nothing else than computing the cartesian product, you could write a function
CartesianProduct
that computes the combinations. I cannot think of anything else rn worked perfectly
thanks a lot
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.