title: How to select objects with specific IDs from a JSON array with jq?
body: <p>I have a JSON file containing an array of objects (<em>test.json</em>):</p>
  
  <pre><code>[
      {
          "name": "Test 1",
          "id": 1
      },
      {
          "name": "Test 2",
          "id": 2
      },
      {
          "name": "Test 3",
          "id": 3
      }
  ]
  </code></pre>
  
  <p>I want to extract all objects, that have a certain ID. I managed to get an object if I want just one specific ID: <code>jq 'map(select(.id == 2 ))' test.json</code>.</p>
  
  <p>Thing is, I have a list of IDs, say 1 and 3. How do I get a list containing only those object? So in this example a list containing the objects with ID 1 and 3?</p>
  
  <p>You can check the example here: <a href="https://jqplay.org/s/xQgpA4yJAz" rel="nofollow noreferrer">https://jqplay.org/s/xQgpA4yJAz</a></p>