title: How to inject map and filter based on map content in gremlin
body: <p>I am running JanusGraph server and connected to it from gremlin console.</p>
  <p>As can be seen, I have two vertices, with id property set to 1 and 2</p>
  <pre><code>gremlin&gt; g.addV('user').property('id', 1)
  ==&gt;v[4224]
  gremlin&gt; g.addV('user').property('id', 2)
  ==&gt;v[4192]
  gremlin&gt; g.V().valueMap()
  ==&gt;{id=[2]}
  ==&gt;{id=[1]}
  </code></pre>
  <p>Next, I injected a map arraylist with different properties. I am trying to loop over this map and filter the vertices, but I couldn't figure out why the query isn't working. Can someone please help me figure out right query?</p>
  <p>I tried using terminal step next() after select(&quot;id&quot;), but that failed too.</p>
  <pre><code>gremlin&gt; g.inject([[&quot;id&quot;: 1], [&quot;id&quot;: 2, &quot;something&quot;:&quot;anything&quot;]]).unfold().as(&quot;m&quot;).V().has(&quot;user&quot;, &quot;id&quot;, select(&quot;m&quot;).select(&quot;id&quot;))
  Value [[SelectOneStep(last,m), SelectOneStep(last,id)]] is not an instance of the expected data type for property key [id] and cannot be converted. Expected: class java.lang.Integer, found: class org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal
  Type ':help' or ':h' for help.
  Display stack trace? [yN]
  </code></pre>
  <p>I can't use <code>g.V().has(label, key, within(...))</code>, as I need to use same map in multiple places and repeat steps for each row.</p>