小编KAd*_*ude的帖子

如何使用JavaScript在ReThinkDB中的ReQL中对数组应用过滤器

在以下JSON中,我想选择销售额> 12500的记录.如何在ReThinkDB和ReQL中执行此操作?

JSON是:

{
 "address": {  
    "address_line1":  "Address Line 1" ,
    "address_line2":  "Address Line 2" ,
    "city":  "Kochin" ,
    "country":  "India" ,
    "state":  "Kerala"
  } ,
  "id":  "bbe6a9c4-ad9d-4a69-9743-d5aff115b280" ,
  "name":  "Dealer 1" ,
  "products": [
         {
           "product_name":  "Stabilizer" ,
           "sales": 12000
         } ,
         {
           "product_name":  "Induction Cooker" ,
           "sales": 14000
         }
    ]
   }, {
    "address": {
          "address_line1":  "Address Line 1" ,
          "address_line2":  "Address Line 2" ,
          "city":  "Kochin" ,
          "country":  "India" ,
          "state":  "Kerala"
     } ,
     "id":  "f033a4c2-959c-4e2f-a07d-d1a688100ed7" ,
     "name": …
Run Code Online (Sandbox Code Playgroud)

json filter nested-query rethinkdb reql

4
推荐指数
1
解决办法
6080
查看次数

标签 统计

filter ×1

json ×1

nested-query ×1

reql ×1

rethinkdb ×1