Below is a guide for using this extension for the first time. For this example, we will read a JSON file that is saved here.
Step by Step Guide
- In SPSS Modeler v16.0 or 17.0, it is not possible to create proper ‘source’ nodes with R code. However it is possible if you trick the software a bit: you just have to put a user input with fake fields before the Read JSON File node in order to make the stream start. In this example we put a User Input node with: Field a; Storage String; Values “a” (see the screenshot below).
- The “Read JSON File” node should be saved in the Field Ops palette when it is installed. Double click on this node to add it to the stream.
- Edit the node and fill in the fields:
- Add an output node after the “Read JSON File” node, in order to visualize the data you gathered. For example you can start with a ‘Table’.
- Right click on the table and run the stream
Browse for a File: choose the JSON file you want to import
Specified path to array: Check the box if your JSON file is not an array. Then, specify the path to the array you want to display in your table. In our example the path would be “id_array”.
Results and Interpretation
Your results should match the table below:
Below is a video walk through for this sample use case for this new extension:
For more information on using this extension, please see the documentation located here.