$processor$: get-data
get-data
processor is used to get data from “data”.-- string foo: $processor$: get-data
foo: "hello"
is part of “data”, the variable foo
will be get “hello” as the value.key
attribute:-- string foo: $processor$: get-data key: some-other-key-instead-of-foo
-- string foo: $processor$: get-data "hello world"
get-data
processor.integer
, boolean
etc, the default value can also be provided in the caption. E.g.-- string foo: hello world $processor$: get-data
body
and caption
when using get-data
is an error.We will be reading the data from JSON file and injecting the value to the caller of the processor (caller could be variable or component).
Step - 1 : We need to make two files i.e. one file should be .ftd and another file should be .json
Step - 2 : Creating .ftd (for example, record.ftd)
-- record person: caption name: integer age: string gender: -- person arpita: $processor$: get-data file: foo.json -- ftd.text: $foo.name -- ftd.text: $foo.age -- ftd.text: $foo.gender
{ "name": "arpita", "age": 15, "gender": "female" }
arpita 15 female