![]() |
E.1 Embedded Cluster Templates |
cluster address: addr1$, addr2$, city$, state$, zip$ // cluster template cluster client: client_id$, client_name$, cluster address cluster user: login$, name$, cluster address, age cluster company: company_name$, cluster address client->city$ = 'San Diego'Cluster templates also can be embedded into other clusters and used as JSON OBJECTS as shown in the example below.
cluster name: first$, last$ cluster multi: ssn$, prefix cluster name, tax, is_okay? add cluster multi multi->ssn$ = '222-33-4444' multi->name->first$ = 'Mister2 "they say"' multi->name->last$ = 'Smith2' multi->tax = 45.678 multi->is_okay? = falseTo store data into a cluster variable that is part of a JSON object, the cluster name and the cluster template name must both be specified as shown below.
multi->name->first$ = 'Mister' multi->name->last$ = 'Smith'Adhoc JSON objects can be created without using embedded cluster templates. When defining the cluster, specify the name of the object when describing the variable. The example below will create an object named "address" that describes the address variables to include.
Hide Description
|
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |