Assuming I have the following JSON object (which is just an example):
{ "foo": 1, "bar": 2, "baz": 3 }And the following JSON array (another example):
["foo", "baz"]How could I use jq to output the following object?
{ "foo": 1, "baz": 3 }I hate asking this question because I feel certain it has been answered before, but google has failed me and my jq-fu is just not where it needs to be to figure this out.