Passing json objects into ipcRenderer.send


Any code example on how I can pass in a json object into send / recv function through electron ipc functions.


There are examples in the documentation on how to send and receive messages in both directions:


All examples i have come across seem to pass just one string as argument


win.webContents.send(‘ping’, ‘whoooooooh!’)

Can I do something like

win.webContents.send(‘ping’, {keys:[‘name’:‘whoooooooh!’, ‘value’:‘woooww’]})


Yes, you can.