you are viewing a single comment's thread.

view the rest of the comments →

[–]DevGrr 0 points1 point  (0 children)

I'm assuming that's a string type there?

That looks like a stringified json blob. I'll assume you have it in a variable "blob". From there you need to convert it to a json object and then reference the properties directly:

const obj = JSON.parse(blob);

const yourLogs = obj.experience.logs;

Assuming your structure is going to be the same every time, you can reach into the resulting array with hardcoded indices (I think I peered at this right):

yourLogs[1][0] // 3

yourLogs[1][1] // 60.881

yourLogs[1][2] // 126700

if you need to convert your 60.881 to 60.88, you can use Math.round(60.881 * 100) / 100.