JSFiddle - React, Tailwind, and code Playground
by Avi Algaly
JavaScript
const json = '{"type":"asynchronous_optical","demodulated_data":{"data_points_id":[18144,18145,18152,18153,18160,18161,18168,18169,18146,18147,18154,18155,18162,18163,18170,18171,18148,18149,18156,18157,18164,18165,18172,18173,18150,18151,18158,18159,18166,18167,18174,18175],"timestamps":[3582253,3582253,3582268,3582268,3582284,3582284,3582300,3582300,3582256,3582256,3582272,3582272,3582288,3582288,3582304,3582304,3582260,3582260,3582276,3582276,3582292,3582292,3582308,3582308,3582264,3582264,3582280,3582280,3582296,3582296,3582312,3582312],"calculated_points":[0.32959,0.57648,0.20635,0.25089,0.02600,0.00504,0.30806,0.11752,1.33147,1.56367,1.18537,0.80549,1.26089,1.05459,1.01115,1.11475,0.24493,0.06524,0.34896,0.13491,0.75462,0.06022,0.17202,0.08250,1.14272,1.65200,0.81334,1.33850,0.12714,0.66888,0.19073,0.56183]}}{"type":"asynchronous_optical","demodulated_data":{"data_points_id":[18176,18177,18184,18185,18192,18193,18200,18201,18178,18179,18186,18187,18194,18195,18202,18203,18180,18181,18188,18189,18196,18197,18204,18205,18182,18183,18190,18191,18198,18199,18206,18207],"timestamps":[3582321,3582321,3582336,3582336,3582352,3582352,3582368,3582368,3582324,3582324,3582340,3582340,3582356,3582356,3582372,3582372,3582328,3582328,3582344,3582344,3582360,3582360,3582376,3582376,3582332,3582332,3582348,3582348,3582364,3582364,3582380,3582380],"calcula ted_points":[0.41968,0.74129,0.35087,0.53237,0.00551,1.39395,0.33332,0.14593,1.31789,1.14601,1.12607,0.72225,1.40480,1.54099,0.67667,0.78484,0.24792,0.06984,0.34217,0.13102,0.72356,0.05433,0.17155,0.07307,1.01874,1.41165,0.80945,1.50815,0.10770,0.59999,0.18087,0.54278]}}'
const a=json.split("}{");
console.log(JSON.parse(a[0]+"}"))
console.log(JSON.parse("{"+a[1]))