CacheControl / CacheControl/json-rules-engine

Not able to resolve JsonPath when it includes a where condition

未關閉
#318 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
3.1k
分支
507
PR 合併指標
30 天內沒有已合併 PR

描述

I have specified this as my condition

conditions: {
all: [{
fact: 'displayMessage',
operator: 'equal',
value: "iphone",
path:"$.childobj.phoneNumbers.[?(@.number=='0123-4567-8888')].type"
}]

And this is the fact -

const facts = { displayMessage: {"childobj" : { "age" : 45 , "phoneNumbers": [
{
"type": "iphone",
"number": "0123-4567-8888"
},
{
"type": "home",
"number": "0123-4567-8910"
}
]} } }

It is not working..
Can you please tell me if this is supported or not?
It is working if i specify this path - $.childobj.phoneNumbers.[0].type where no condition is specified. Whereas in the above path I have specified the condition.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先使用提供的事實重現所回報的條件,並將篩選後的 JsonPath 與正常運作的索引路徑進行比較。追蹤 JsonPath 評估的進入點以及現有的測試(如果有);當條件路徑要麼在經過驗證的行為下受到支援,要麼其不支援的狀態已清楚記錄時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
backend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。