我有JSON,如下所示
{
"_id": "000fad10-b2de-11e6-92de-632a9b1d21d9",
"_type": "Company",
"status": 1,
"transactions": [
{
"completed": 1,
"currency": "USD",
"date": "2015-12-01T18:30:00.000Z",
"method": 0,
"type": 0
}
]
}
我想像下面的查询一样运行
select * from MyBucket where transactions.method in (0,3);
我怎么能在N1QL中做到?
答案 0 :(得分:2)
答案 1 :(得分:2)
SELECT * FROM MyBucket WHERE ANY x IN transactions SATISFIES x.method in[1,0] END;
我得到了这个答案