$processor$: get-data
get-data
processor is used to get data from a JSON files in the package or from document-metadata in sitemap.-- 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
Have a question or need help?
Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.
Join our Discord channel and share your thoughts, suggestion, question etc.
Connect with our community!We welcome you to join our Discord community today.
We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.