Use saveJSON to write some values in a JSON file

I am trying to save to a JSON file.
I like to save the value r1 and r2 in a JSON file. (The path ist right but the file does not exist)
I start the custom module...
but I receive an error "unautorized file type".

var rangeKeys = '{}';
rangeKeys.id = '0';
rangeKeys.r1 = '21';
rangeKeys.r2 = '33'
saveJSON(rangeKeys,'../data/filemaker/range.json')

Found it... my bad...

Syntax saveJSON: First the path and than the variable.
saveJSON('../data/filemaker/range.json',rangeKeys)

var rangeKeys = {};
rangeKeys.id = '0';
rangeKeys.r1 = '21';
rangeKeys.r2 = '33'
saveJSON('../data/filemaker/range.json',rangeKeys)