I know there's a json_encode on php. currently we are using that. But it's the only thing that slows the app down cause it needs to go to the server.
Here's the situation, we 2 apps. Let's call them app1 and app2.
App1 is a big application. One of it's input is a php array.
Now app2 on the other hand is a small application created to help app1. App2 has a form. The form has many many fields. Then all of these fields will be converted to the correct php array format, ready to be used as an input in app1.
Now our problem, every time we use app2, we should be more careful or always keep the fields. Cause if there's one field with wrong info, we need to do it again, use app2 to get the correct array.
So, we think we need to add a feature on app2. We want it to be able to edit the php array it produce. We've done that. When php array is given, we send it to server, use json_encode, then put everything in place. Now we have all the fields populated and we can then edit the fields with incorrect data.
At the moment, we are okay with that, but I think it would be more efficient to not go to the server and just convert the php array using js... I've searched google and stackoverflow, I found nothing. I did try using .replace(), but I haven't figured it out yet a good result..
I'm hoping someone can help me here..
EDIT:
it's a PHP array format by the way...
as simple example we have to input fields. After filling out the fields it will output a PHP array format in textarea.