To get started with generating documents from JSON data, click on the
New document button. This button is represented by a plus sign icon:
Continue, you’ll land on the Data items section. In this section, you are required to input a JSON array of objects, with each object representing a separate data item.
To aid in this process, the input field will be pre-filled with an example of a JSON object. This JSON object will have keys corresponding to the merge tags in your template. For instance, if your template has merge tags
[Phone], the pre-filled JSON might look something like this:
You can replace this example with your own JSON data. Remember, each key in your JSON objects should correspond to a merge tag in your template. For example, this is how a JSON array with 2 objects would look for this set of merge tags:
Once you’ve entered your data, click on
Continue with N items, where N is the number of objects in your JSON array. DocuGenerate will parse the JSON data and, for each object, it will generate a separate document. The merge tags in your template will be replaced with the corresponding values from each JSON object during this process.
This method is particularly useful when you need to generate documents based on complex or large data sets.