const { dialog } = require('electron').remote;
function func() {
dialog.showOpenDialog(
{
title: 'gdghghyrtyuty',
properties: ['openFile'],
filters: [{name: 'JSON', extensions: 'json'}]
},
function (filename) {
....
....
....
})
};