Firstly, what you have as your object model is more of a hash like object or simply a JavaScript object with keys and values, so the best way to do that is simply using JSON.parse.
So if you can do it as you said: I can format the string in any way, you better first change your formatting to have something like:
'{"id1":234,"id2":4566,"id3":3000}'
instead of :
id1:234,id2:4566,id3:3000
you can do it using JSON.stringify on the client side JavaScript using a JavaScript object without you needing to deal with string formatting:
//on the client side
var myObj = {};
myObj.id1 = 234;
myObj.id2 = 4566;
myObj.id3 = 3000;
var objStr = JSON.stringify(myObj);
let's say you encrypt your string using a function named encrypt:
var encryptedStr = encrypt(objStr);
//so now you should use encodeURI to be able to put it in the queryString
var queryStringParam = encodeURI(encryptedStr);
now you put the queryStringParam in the queryString.
Then on the node.js side, all you should do is parsing it as a JSON object. The other important point that you probably have considered doing it is using decodeURI. For the last step, let's say you are using e function named decrypt:
//the server-side code
var decryptedStr = decrypt(decodeURI(yourQueryString));
var obj = JSON.parse(decryptedStr);
Now obj is exactly what you want.
id1,id2andid3supposed to be in your example? They are not variables, but string literals right?