markdown-mode uses parts of outline-mode for folding. So, IMHO it is most natural to implement the folding of items also with the help of outline-mode.
The most obvious way would be:
to include beside markdown-regex-header also markdown-regex-list in outline-regexp
to replace the function markdown-outline-level as value of variable outline-level by some ...
As it seems, no builtin solution exists for your problem.
Origami (available from MELPA) can do it for you, although it does some strange things for arrays of objects:
- prop1: Value 1
prop2: Value 2...
Here, the ellipsis is Origami’s marker to show there’s hidden text. This is probably because, as the README says:
Anything not in this list [of supported ...
Try enabling hideshow minor mode:
Assuming yaml-mode is conventionally written, you should then be able to toggle folding of a (sub)tree, type C-c @ C-c.
Type M-: (info "(emacs) Hideshow") RET to go to the manual section.