mongodb v3.4 - wiredtiger - compact does not work
@mils, The compact administration commands Rewrites and defragments all data and indexes in a collection. On WiredTiger databases, this command will release unneeded disk space to the operating system.

compact has the following form:

{ compact: &lt;collection name&gt; }


In you case after the db.runCommand(command) , you have got the message such as 

{
    "ok" : 1.0
}


it means your command has successfully executed.

On WiredTiger, compact will rewrite the collection and indexes to minimize disk space by releasing unused disk space to the system. This is useful if you have removed a large amount of data from the collection, and do not plan to replace it.

I am also attaching the db.runCommand(command) picture from mongo shell command,for proper format understanding of that command.

 

WARNING:-
Always have an up-to-date backup before performing server maintenance such as the compact operation.

How to check the storage engine from the mongo command shell


  db.serverStatus().storageEngine


Note : -
As per MongoDB BOL  the WiredTiger Storage Engine From the MongoDB version 3.2: The WiredTiger storage engine is the default storage engine starting in MongoDB 3.2. For existing deployments, if you do not specify the --storageEngine or the storage.engine setting, MongoDB 3.2 can automatically determine the storage engine used to create the data files in the --dbpath or storage.dbPath.

For further your ref compact