this way…
var widgetData = loadJSON(‘widget-data.json’)
app.on(‘sessionOpened’, function(data, client) {
receive(’/EDIT’, ‘widget_id’, JSON.stringify(widgetData))
})
this way…
var widgetData = loadJSON(‘widget-data.json’)
app.on(‘sessionOpened’, function(data, client) {
receive(’/EDIT’, ‘widget_id’, JSON.stringify(widgetData))
})
I’m not sure to get it: you’re basically sending what’s in widget-data.json
here, if you wan’t to only send a subset simply write something like
receive('/EDIT', 'widget_id', JSON.stringify(widgetData.session.tabs[5]....))
Ok, i need to use ‘/get’ here, i don’t want to update the widget, just want to get the values of one widget. Completly overlooked the edit here… Thanks!