Nested Sequences

When related sequences of data (such as arrays) are nested inside other sequences of data, this relationship is indicated by indentation. So, for example, let’s suppose you have this array declared in Ruby:

nested_arrays.rb

arr = [1,[2,3,[4,5,6,[7,8,9,10],"end3"],"end2"],"end1"]

When rendered as YAML (for example, by y( arr )), this becomes as follows:

---
- 1
- - 2
  - 3
  - - 4
    - 5
    - 6
    - - 7
      - 8
      - 9
      - 10
    - end3
  - end2
- end1
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.199.181