Conversation
| { | ||
| "prompt": "Construct a list of all properties (keys) of a product", | ||
| "dataset": "product", | ||
| "solution": "to_entries | [.[].key]" |
There was a problem hiding this comment.
Both methods should return the same result, I think the to_entries is more general.
What do you think I should do with PR?
There was a problem hiding this comment.
That's a good point (and while we're at it, add to_entries | map(.key) to the set of "valid" solutions—many right answers here!)
What we're showing here is basically the tutorial's "official" solution. We haven't (yet) formed strong opinions around presenting primitive v. higher-level features in this setting, but I think keys will be more practical for learners / new users. Let's show that here.
There was a problem hiding this comment.
Ok, I will set it this way. On the other side, my intention was to show the way to get names of keys to work on.
No description provided.