1# Example showing how -top- gives access to the entire data provided to a mustache template. 2 3#+begin_src cfengine3 4bundle agent main 5{ 6 vars: 7 "data" data => '{ "key": "value", "list": [ "1", "2" ] }'; 8 9 reports: 10 "-top- contains$(const.n)$(with)" 11 with => string_mustache("{{%-top-}}", data ); 12} 13#+end_src 14 15############################################################################### 16 17#+begin_src example_output 18#@ ``` 19#@ R: -top- contains 20#@ { 21#@ "key": "value", 22#@ "list": [ 23#@ "1", 24#@ "2" 25#@ ] 26#@ } 27#@ ``` 28#+end_src 29