I got an object in below format from back end;
Array ([one] => [two] => 1000)
I want this in JSON format, How can I convert? I'm using online JSON parser. unfortunately it failed to do the job.
I got an object in below format from back end;
Array ([one] => [two] => 1000)
I want this in JSON format, How can I convert? I'm using online JSON parser. unfortunately it failed to do the job.
You can use PHP to convert your array to JSON
<?php json_encode(your_array); ?>
while sending the code from PHP side and convert back to array at the client side using
JSON.parse(response);
you can use php to convert your array to json
<?php json_encode(your_array); ?>