SaveJsonFile

Takes two parameters, FileName, Options

Description:

This command saves the Work Query as JSON data. The first parameter is the output filename, the second parameter is Options, which is documented below.

Usage:

The following Options are available, and may be space separated for valid combinations. The default used if blank is just the single value of "Array".

Example:

 

LoadTable "MemTab.Person"
LTrimFields "MemTab.Person."
    
[New] Buff
    
Buff | JsonStream$ "Object"
SetNew "Embeded", `Buff
    
Buff | JsonStream$ "Object Array Format Embed"
SaveFile "Test1.json", Buff
SaveJsonFile "Test2.json", "Object Format Embed"
    
HtmlAlert "&success", "All ok! All Done."

Output:

[
    [{
        "Alias": 10101,
        "Firstname": "DB Admin",
        "Lastname": null,
        "Birthdate": null,
        "Gender": "Male",
        "Email": "[email protected]",
        "Embeded": {"10101":{"Firstname":"DB Admin","Lastname":null,"Birthdate":null,"Gender":"Male","Email":"[email protected]"},"10102":{"Firstname":"TrainerBob","Lastname":"Moxie","Birthdate":null,"Gender":"Male","Email":"[email protected]"}}
    }],
    [{
        "Alias": 10102,
        "Firstname": "TrainerBob",
        "Lastname": "Moxie",
        "Birthdate": null,
        "Gender": "Male",
        "Email": "[email protected]",
        "Embeded": {"10101":{"Firstname":"DB Admin","Lastname":null,"Birthdate":null,"Gender":"Male","Email":"[email protected]"},"10102":{"Firstname":"TrainerBob","Lastname":"Moxie","Birthdate":null,"Gender":"Male","Email":"[email protected]"}}
    }]
]