I want to generate this string from Array of Object.
String:
"{{ ""t"": 3, ""s"":910},{ ""t"": 6, ""s"":4030},{ ""t"": 10, ""s"":2300}}"
Array of Object
0: {t: 3,s: 910}
1: {t: 6,s: 4030}
2: {t: 10,s: 2300}
Can anyone guide me how to do it.
I want to generate this string from Array of Object.
String:
"{{ ""t"": 3, ""s"":910},{ ""t"": 6, ""s"":4030},{ ""t"": 10, ""s"":2300}}"
Array of Object
0: {t: 3,s: 910}
1: {t: 6,s: 4030}
2: {t: 10,s: 2300}
Can anyone guide me how to do it.
2
Answers
You can do it using JSON.stringfy() function.
Here is code.
Hope this is helpful.
Try the following code.
log: "{{ { ""t"": 3, ""s"": 910 }, { ""t"": 6, ""s"": 4030 }, { ""t"": 10, ""s"": 2300 } }}"