How do you make a keyBy on an object? #3377
Unanswered
LunaticMuch
asked this question in
Q&A
Replies: 3 comments 2 replies
-
try |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hello @LunaticMuch . You've written your input as
, but this isn't valid javascript (types is an object with values but no keys). Is the types field meant to be an array?
in which case what you've written, |
Beta Was this translation helpful? Give feedback.
0 replies
-
My bad, I updated the example. It's not an array anyway. Each object has a key, the key needs to be replaced with the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking at migrating out from Lodash, but as expected in some cases it's more tricky.
The code I have is using a
keyBy
asWhich could be swapped with
However,
schema.types
is an object, in a form like (when it's the input):With the keyBy it gets out as
So natively, can't go. Which option could I use?
Beta Was this translation helpful? Give feedback.
All reactions