OSC Listener and objects

Hi,

i have an osc listener syntax that is working:

receive('/widgetid/listenerid','{ "min": ' + 1 + ',"max":' + 125 + '}');

but when i try to do:

receive('/widgetid/listenerid','{' + obj[key][0] + ':' + 1 + ', ' + obj[key][1] + ':' + 125 + '}');

it does not work..

the objects value at the corresponding key is also a string (like min and max).

Is there a way to get this working?

Thanks!

You are producing an invalid JSON string (missing double quotes arround key names). Note that sending a plain - non stringified - object would work just fine (it will be turned into JSON automatically).

Thanks! (i changed my objects, now it is working perfectly)