CacheControl / CacheControl/json-rules-engine
Not able to resolve JsonPath when it includes a where condition
- 主要言語
- 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