[Solved] getting Invalid json error when I am decoding below data using json_decode in PHP [closed]


You need to use stripslashes to remove \\ and then decode

$data="[{\\"field_display_txt\\":\\"New custom field phone\\",\\"field_value\\":0},{\\"field_display_txt\\":\\"New custom field\\",\\"field_value\\":\\"test_zapier\\"},{\\"field_display_txt\\":\\"New custom field select\\",\\"field_value\\":\\"1\\"}]";
  $json = json_decode(stripslashes($data), true);

 print_r($json);

http://sandbox.onlinephpfunctions.com/code/a43301dddeb89aedca6a50eed703f935ac721496

solved getting Invalid json error when I am decoding below data using json_decode in PHP [closed]