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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -