I have the following Json line:
var jsonString = '{"Users":[{"Name":"abc","Value":"test"},{"Name":"def","Value":"test"}]}';
I am trying to use the ZF2 JsonModel class (Zend \ View \ Model \ JsonModel) in a controller to display my view with the above JSON string. However, instead of a JSON string, it seems that only an array is required.
How to make the controller return a JSON string?
thank
source
share