08. VisualJSON

https://paper.dropbox.com/doc/08.-VisualJSON--BtMOXl3TG2i80Bp51PnG6fI2Ag-O48ZcuJjnL9vbz3sZdmOa

08. VisualJSON

<— Reactor Home

The VisualJSON BlackBox is used to visualise a JSON dataset in a tree-like structure, with the ability to expand/collapse sub-structures. It uses the JSON Viewer library.

https://www.cssscript.com/minimal-json-data-formatter-jsonviewer/

Parameters

The parameters are as follows:

VisualJSON ( json )

Parameter

Description

json

A field containing your JSON text that represents your data object

Eg, "GLOBALS::example_json_pivot"

Example

VisualJSON ( 

  "GLOBALS::example_json_complex" 

)  

In order to generate your JSON string from FileMaker records, the easiest way is to use the in-built FM JSON functions. 

Relationship

This BlackBox is designed for a single record, rather than a found set. So your table occurrence should have a relationship from the current context that matches to only one record.

Reactor knows nothing about your current found set.

If your current context is the record containing the JSON you wish to use as your dataset, create a self-relationship, and use that as the BlackBox parameter(s):

User-uploaded image: image.png

Style Customisations

You can customise the CSS of the BlackBox by using Reactor Core to edit the following CSS document:

You will need to recompile the BlackBox to apply any changes you make.

<— Reactor Home