@ -709,7 +709,13 @@ To convert a dictionary into a list of lists, use `items()`:
:echo breakfastNo
" returns {'2': '9am', '11ses': '11am'}
```
Since a dictionary contains key-value pairs, Vim provides `v:key` special variable that works similar to `v:val`. When iterating through a dictionary, `v:key` will hold the value of the current iterated key.
If you have a `mealPlans` dictionary, you can map it using `v:key`.
@ -717,7 +723,15 @@ To convert a dictionary into a list of lists, use `items()`:
" returns {'lunch': 'lunch and milk', 'breakfast': 'breakfast and milk', 'dinner': 'dinner and milk'}
```
The `v:key` is Vim's special variable, much like `v:val`. When iterating through a dictionary, `v:key` will hold the value of the current iterated key.