Closed
Description
I noticed that in filter, I can't use var (probably loses context to data), it would be nice if you could also use data from data
. here is my example of use:
Data
{
"locale": "pl",
"locales": [
{
"name": "Israel",
"code": "he",
"flag": "🇮🇱",
"iso": "he-IL",
"dir": "rtl"
},
{
"name": "українська",
"code": "ue",
"flag": "🇺🇦",
"iso": "uk-UA",
"dir": "ltr"
},
{
"name": "Polski",
"code": "pl",
"flag": "🇵🇱",
"iso": "pl-PL",
"dir": "ltr"
}
]
}
Valid JSON
{
"filter": [
{
"var": "locales"
},
{
"!==": [
{
"var": "code"
},
"pl"
]
}
]
}
Invalid JSON
{
"filter": [
{
"var": "locales"
},
{
"!==": [
{
"var": "code"
},
{
"var": "locale"
}
]
}
]
}
in both cases I should receive:
[{"name":"Israel","code":"he","flag":"🇮🇱","iso":"he-IL","dir":"rtl"},{"name":"українська","code":"ue","flag":"🇺🇦","iso":"uk-UA","dir":"ltr"}]
maybe some additional operator? or maybe _.locale
to get access the original data?
Metadata
Metadata
Assignees
Labels
No labels