Deserialize map type in javascript

i try to add input parameters as map type
key: name value : “test”
key: age value: 5

i expect that i will have an object like this { name: “test”, age: 5}
but i get this : rO0ABXNyABFqYXZhLnV0aWwuVHJlZU1hcAzB9j4tJWrmAwABTAAKY29tcGFyYXRvcnQAFkxqYXZhL3V0aWwvQ29tcGFyYXRvcjt4cHB3BAAAAAJ0AANhZ2V0AAIxMnQABG5hbWV0AANheWF4

i want to deserialized this object in javascript ??

2 Likes

@ayatalat Hi, I have the same question. Did you resolve this? How to deserialize this string?

Hi I am having the same question. Does anyone have any ideas on how to deserialized the map/list process variable in javascript?

This is base64 encoded. Running it through a decoder reveals this:

¬í�sr�java.util.TreeMapÁö>-%jæ�L�
comparatort�Ljava/util/Comparator;xppw���t�aget�12t�namet�ayax

Where and how are you getting this value? This question is in the Modeler topic, but it’s not clear to me how I would reproduce this issue…

Josh

I got the encoded value (like what ayatalat posted) by getting the process variable in javascript “task.variables.get(‘map_variable’);”
where map_variable is a map, could be something like “{“number”: 5}”.