Jaydata和查询(JSQL) [英] Jaydata and queries (JSQL)
本文介绍了Jaydata和查询(JSQL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要一些简单的jaydata。我想运行一个查询并返回true或false。例如
I want something simple in jaydata. I want to run a query and return true or false. For example
var existingPatients = Database.Test.filter("Id", "==", 5);
然后如果它返回true我想更新特定患者加他
and then if it returns true i want to update the specific patient of add him
$.getJSON("http://www.json-generator.com/j/bMeLdrhCGa?indent=4", function (result) { //
$.each(result, function (i, jsonfield) {
var existingPatients = Database.Test.filter("Id", "==", jsonfield.Id).toArray();
})
});
推荐答案
.getJSON( http://www.json-generator.com/j/bMeLdrhCGa?indent=4,function(result){ //
.getJSON("http://www.json-generator.com/j/bMeLdrhCGa?indent=4", function (result) { //
.each(result,function(i,jsonfield){
var existingPatients = Database.Test.filter( Id, ==,jsonfield.Id).toArray();
})
});
.each(result, function (i, jsonfield) { var existingPatients = Database.Test.filter("Id", "==", jsonfield.Id).toArray(); }) });
这篇关于Jaydata和查询(JSQL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文