javascript - replace "[ with [ and ]" with ] json -


मेरे पास एक JSON नीचे है:

  [{"type": "point" , "निर्देशांक": "[- 77.0338.90]"}, "गुणधर्म": {"शहर": 3, "url": "xyz.com"}]   

मुझे चाहिए "[ के साथ [ और ]" के साथ ]

को बदलने के लिए <{{"प्रकार": "बिंदु", "निर्देशांक": "[- 77.03,38.90] "}," गुण ": {" शहर ": 3," url ":" xyz.com "}]; $ JsonString = preg_replace ('/' ([^ "+]" \ s *: \ s * / ',' $ 1: ', $ yourJson); $ स्ट्रिंग = बदलें = str_replace (' "[',' [', $ jsonString); $ StringReplace = str_replace ('] "', ']', $ स्ट्रिंग रीप्लस); $ echo $ string; जगह

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -