Closed liangklfangl closed 1 year ago
Invoke a java method which return value like bellow:
{ "value0": { "0": 67, "1": 35, "2": 69, "3": 54, "4": 52, "5": 49, "6": 52, "7": 69, "8": 44, "9": 35, "10": 70, "11": 70, "12": 55, "13": 51, "14": 55, "15": 51, "16": 44, "17": 84, "18": 76, "19": 95, "20": 66, "21": 82 }, "hash1": 0 }
I am confused about how to convert this return value to js object?
That is a Java string, you can use the cjStringJavaToJs API (documented here https://docs.leaningtech.com/cheerpj/Runtime-API#cjstringjavatojsstr--cjstringjstojavastr) to obtain a JS version.
cjStringJavaToJs
Invoke a java method which return value like bellow:
{ "value0": { "0": 67, "1": 35, "2": 69, "3": 54, "4": 52, "5": 49, "6": 52, "7": 69, "8": 44, "9": 35, "10": 70, "11": 70, "12": 55, "13": 51, "14": 55, "15": 51, "16": 44, "17": 84, "18": 76, "19": 95, "20": 66, "21": 82 }, "hash1": 0 }
I am confused about how to convert this return value to js object?