Step: Transform with map()
Transform with map()
map(f) applies f to every element of an array and returns a new array. It's shorthand for [ .[] | f ].
Pitfall: map expects an array as input (not a stream). Use [ .[] | f ] if you're mid-stream.
Your turn: produce an array of every product's price.
Input:
Expected:
Step 18 of 27