added js for publishJSONCommand