Created
March 7, 2020 21:08
-
-
Save grahamc/c9edb6ffc296820888dea22e4ea846f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facilities=$(nix-instantiate --json --strict --eval --argstr id_str "$facility_ids" --argstr facility_data_str "$facility_data" --expr ' | |
{ id_str, facility_data_str }: | |
let | |
ids = builtins.fromJSON id_str; | |
input = builtins.fromJSON facility_data_str; | |
facilities = builtins.filter | |
(facility: builtins.elem facility.id ids) | |
input.facilities; | |
in (map (f: f.code) facilities) | |
') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment