Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
This JSL file contains functions for converting JSON text into either a JSL data structure or a JMP data table. JSON represents a structure of nested "arrays" and "objects". JSON types/values are represented as follows in JSL:
sequence of values
set of named values
When converted to a JMP data table, names represent columns and array values represent rows. Non-array values are filled down to match array values.
All functions are within the namespace "JSON" to avoid name collisions with other functions.
dt = JSON:Make Table( json text | obj )
obj = JSON:Parse( json text )
["name" => "France", "population" => 66.1],
["name" => "Germany", "population" => 80.8]
Note the order of the set elements is not preserved. It becomes alphabetical in JMP.
Values of the parsed object can be accessed with normal JSL subscripting. For example, if data holds the above parse result, you can access it with: