# P_savejson
## Syntax:
@savejson(**{filename}**, **{sourceArray}**)
## Use Case:
Saves the contents of an array to a JSON file in the local Data directory.
Useful for persisting complex state or configuration across sessions.
## Arguments:
- **{filename}**   : The name of the json file to create or overwrite.
- **{sourceArray}**: The name of the array to serialize.
## Examples:
1. **/var {success} {@savejson(settings.json, mySettings)}**
## See Also:
@loadjson
