Jquery 太妃糖还是接线员怎么办?

Jquery 太妃糖还是接线员怎么办?,jquery,json,operator-keyword,taffydb,Jquery,Json,Operator Keyword,Taffydb,从一个JSON文件中,我想选择所有书名为“hello”且定价为50或在2010年出版的书 我不知道如何使用OR逻辑运算符 我用| |做过类似的事情,但我认为这不是正确的做法 代码: 有人能帮忙吗?试试这个查询: query({Title:"hello"},[{Price:"50"},{Year:"2010"}]) 从taffyDB页面: // does a match for column that is one of two values db([{column:"value"},{colu

从一个JSON文件中,我想选择所有书名为“hello”且定价为50或在2010年出版的书

我不知道如何使用OR逻辑运算符

我用| |做过类似的事情,但我认为这不是正确的做法

代码:

有人能帮忙吗?

试试这个查询:

query({Title:"hello"},[{Price:"50"},{Year:"2010"}])
从taffyDB页面:

// does a match for column that is one of two values
db([{column:"value"},{column:"value2"}]);

// Real world example - records with a status of active or pending
db([{status:"Active"},{status:"Pending"}]);
// does a match for column that is one of two values
db([{column:"value"},{column:"value2"}]);

// Real world example - records with a status of active or pending
db([{status:"Active"},{status:"Pending"}]);