github.com/jxskiss/gopkg/v2@v2.14.9-0.20240514120614-899f3e7952b4/easy/yamlx/testdata/ref_not_found.yaml (about) 1 obj1: 2 foo: "bar" 3 array: [ 1, 2, 3 ] 4 # Reference to other values, wil be "bar" 5 test_ref1: "@@ref obj1.foo" 6 # Another reference, will be 3 7 test_ref2: "@@ref array.2 " 8 # Get length of "array", will be 3 9 test_ref3: "@@ref array.# " 10 test_ref4: 11 key1: 12 key2: "@@ref test_ref1" 13 key3: "@@ref test_ref2" 14 key4: '@@ref test_ref5 ' 15 friends: 16 - first: Dale 17 last: "@@ref test_ref4.key1.key2" 18 age: 44 19 nets: [ "ig", "fb", "tw" ] 20 - first: Roger 21 last: Craig 22 age: '@@ref test_ref4.key1.key3 ' 23 nets: [ "fb", "tw" ] 24 - first: Jane 25 last: Murphy 26 age: 47 27 nets: [ "ig", "tw" ] 28 # Will be [ "Dale","Roger","Jane" ] 29 test_ref5: '@@ref friends.#.first' 30 test_ref6: 31 key1: '@@ref test_ref4.key1' 32 key2: '@@ref friends.0.phone_number'