Building an array of dictionary items in YAML?

前端 未结 2 1440
醉话见心
醉话见心 2021-02-06 20:36

Basically trying to something in yaml that could be done using this json:

{
models:
 [
  { 
    model: \"a\"
    type: \"x\"
    #bunch of properties...
  },
  {         


        
2条回答
  •  终归单人心
    2021-02-06 21:12

    Use a dash to start a new list element:

    models:
     - model: "a"
       type: "x"
       #bunch of properties...
     - model: "b"
       type: "y"
       #bunch of properties...
    

提交回复
热议问题