tryin to help but no clue, hehe
*python console work as expected*
>>> d = {"content": [{"a": "1", "b": "2", "c": "3"}]}
>>> l = d.values()
>>> l[0]
[{'a': '1', 'c': '3', 'b': '2'}]

*controllers/default.py*
@request.restful()
def api():
response.view = 'generic.' + request.extension

def GET(*args, **vars):
patterns = 'auto'
parser = db.parse_as_rest(patterns, args, vars)
if parser.status == 200:
d = dict(content = parser.response)
l = d.values()
return l[0]
else:
raise HTTP(parser.status, parser.error)

*produce*
<table><thead><tr><th>test.id</th><th>test.a</th><th>test.b</th></tr></thead><tbody><tr
 
class="w2p_odd odd"><td>1</td><td>a</td><td>b</td></tr></tbody></table>

not sure what's going on in the background with parse_as_rest

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to