晨风

-------------------- 业精于勤,荒于嬉;行成于思,毁于随

导航

对json数据进行类似sql查询

Posted on 2016-02-19 17:29  shenyixin  阅读(1599)  评论(0编辑  收藏  举报

添加js引用:jsonsql-0.1.js

通过下面列子得到一个json类型的结果

Example:

jsonsql.query("select * from json.channel.items order by title desc",json);
jsonsql.query("select title,url from json.channel.items where (category=='javascript' || category=='vista') order by title,category asc limit 3",json); 
jsonsql.query("select * from json where (CKey=='DropDownList_Data_End' && CValue=='2014')", obj.data);