-
Notifications
You must be signed in to change notification settings - Fork 0
Index
nntrn edited this page Sep 19, 2023
·
1 revision
(
[ "type1", "type2", "type3" ] |
INDEX( .[]; . )
) as $lkup
map( select($lkup[ .type_identifier]))
Input
[ {"name": "Foo", "is_open": true, "type_identifier": "type4"},
{"name": "Bar", "is_open": true, "type_identifier": "type5"},
{"name": "Some store", "is_open": false, "type_identifier": "type2"}]
Output
[
{
"name": "Some store",
"is_open": false,
"type_identifier": "type2"
}
]