I have a JSON string I want to change it.
The JSON string looks like
string '[{"id":"AT.02708872.T"},{"id":"DE.60232348.A"}]' (length=114)
I want to convert this JSON to
string '[{"id":"AT02708872"},{"id":"DE60232348"}]' (length=114)
So I want to remove the dots and the last letter. I am using Symfony2 (PHP)
Anyone has any idea how can I do it.
Thanks
Decode, modify, re-encode.
There is probably native JSON handling within Symfony2 so you may want to check that out.