Hi!
In the controller, "TestInfos = [[{name, "test1"}], [{name, "test2"}]], 
{ok, [{test_infos, TestInfos}]"

In the javacript, the value is not json array.
$(document).ready(function(){
    console.log("*******", {{ test_infos }});
It will  "Uncaught SyntaxError: Unexpected token , " --> console.log("*******", 
{name,"test1"}{name,"test2"});

I know i can return {json, [{test_infos, TestInfos]} to achieve this.
But i want to return by {ok, [{test_infos, TestInfos}]} and the client get 
{{ test_info }} is a json array, so i can use javascript to handle it in 
some particular situations, not to request the server one more time to get 
the value.

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/178cb911-a409-4dee-a7e0-e3ecf0ee8acf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to